Bird
0
0

You want to create a custom template for a child page with slug 'team' under a parent page with slug 'about'. Which template file will WordPress use if available?

hard📝 Application Q8 of 15
Wordpress - Theme Structure and Basics
You want to create a custom template for a child page with slug 'team' under a parent page with slug 'about'. Which template file will WordPress use if available?
Apage-about-team.php
Bsingle-team.php
Cpage.php
Dpage-team.php
Step-by-Step Solution
Solution:
  1. Step 1: Understand page template hierarchy

    WordPress looks for page-{slug}.php for pages, ignoring parent slug in file name.
  2. Step 2: Identify correct template for child page 'team'

    The correct template is page-team.php.
  3. Final Answer:

    page-team.php -> Option D
  4. Quick Check:

    Child page template uses page-{slug}.php [OK]
Quick Trick: Page templates use page-{slug}.php regardless of parent [OK]
Common Mistakes:
  • Using combined parent-child slug in filename
  • Confusing single post templates with pages
  • Assuming page.php is always used

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes