Bird
0
0

How does WordPress decide which template to use when displaying a taxonomy archive for a custom taxonomy 'genre'?

hard📝 Application Q9 of 15
Wordpress - Theme Structure and Basics
How does WordPress decide which template to use when displaying a taxonomy archive for a custom taxonomy 'genre'?
Ataxonomy-genre.php, then taxonomy.php, then archive.php, then index.php
Btaxonomy.php, then taxonomy-genre.php, then archive.php, then index.php
Carchive.php, then taxonomy-genre.php, then taxonomy.php, then index.php
Dindex.php, then taxonomy.php, then taxonomy-genre.php, then archive.php
Step-by-Step Solution
Solution:
  1. Step 1: Understand taxonomy archive template order

    WordPress first looks for taxonomy-{taxonomy}.php for custom taxonomy archives.
  2. Step 2: Follow fallback order

    If taxonomy-genre.php is missing, it uses taxonomy.php, then archive.php, then index.php.
  3. Final Answer:

    taxonomy-genre.php, then taxonomy.php, then archive.php, then index.php -> Option A
  4. Quick Check:

    Custom taxonomy archive template order = taxonomy-genre.php first [OK]
Quick Trick: Custom taxonomy archives use taxonomy-{taxonomy}.php first [OK]
Common Mistakes:
MISTAKES
  • Mixing order of taxonomy.php and taxonomy-genre.php
  • Assuming archive.php is used before taxonomy.php
  • Thinking index.php has highest priority

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes