Bird
0
0

You want to add a custom message below every post title without modifying core theme files. Which approach respects WordPress theme best practices?

hard📝 Application Q8 of 15
Wordpress - Theme Structure and Basics
You want to add a custom message below every post title without modifying core theme files. Which approach respects WordPress theme best practices?
ACreate a child theme and override the template file that displays the title
BDirectly edit the parent theme's index.php file
CAdd the message inside the footer.php file
DModify the style.css file to include the message
Step-by-Step Solution
Solution:
  1. Step 1: Understand theme modification best practices

    Directly editing parent theme files is discouraged because updates overwrite changes.
  2. Step 2: Use child theme for safe customization

    Creating a child theme and overriding templates allows safe, update-proof changes.
  3. Final Answer:

    Create a child theme and override the template file that displays the title -> Option A
  4. Quick Check:

    Child theme overrides = safe customizations [OK]
Quick Trick: Use child themes to customize without losing changes [OK]
Common Mistakes:
MISTAKES
  • Editing parent theme files directly
  • Adding content in unrelated files like footer.php
  • Trying to add messages via CSS

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes