Bird
0
0

What file must you create in a child theme to override the parent theme's template files?

easy📝 Conceptual Q1 of 15
Wordpress - Theme Structure and Basics
What file must you create in a child theme to override the parent theme's template files?
AA file named <code>override.php</code>
BA file with the same name as the parent template file
CA file named <code>child-template.php</code>
DA file named <code>parent-theme.php</code>
Step-by-Step Solution
Solution:
  1. Step 1: Understand how WordPress loads templates

    WordPress loads template files by their names in the theme folder.
  2. Step 2: Override by matching file names in child theme

    To override a parent template, create a file with the exact same name in the child theme folder.
  3. Final Answer:

    A file with the same name as the parent template file -> Option B
  4. Quick Check:

    Override template = same file name [OK]
Quick Trick: Match parent file names exactly to override templates [OK]
Common Mistakes:
  • Creating files with different names expecting override
  • Using special override filenames like override.php
  • Modifying parent theme files directly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes