Bird
0
0

Why might WordPress use index.php instead of category.php when displaying a category archive?

medium📝 Debug Q7 of 15
Wordpress - Theme Structure and Basics
Why might WordPress use index.php instead of category.php when displaying a category archive?
AThe category archive is disabled in WordPress settings
Bindex.php has higher priority than category.php
Ccategory.php file is missing from the theme
Dcategory.php is only for single posts
Step-by-Step Solution
Solution:
  1. Step 1: Understand fallback behavior

    If category.php is missing, WordPress falls back to archive.php or index.php.
  2. Step 2: Identify reason for fallback

    Missing category.php causes WordPress to use index.php as last fallback.
  3. Final Answer:

    category.php file is missing from the theme -> Option C
  4. Quick Check:

    Missing category.php causes fallback to index.php [OK]
Quick Trick: Missing template files cause fallback to index.php [OK]
Common Mistakes:
  • Thinking index.php has higher priority
  • Assuming category archives can be disabled
  • Confusing category.php purpose

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes