Recall & Review
beginner
What is the WordPress template hierarchy?
The WordPress template hierarchy is the system WordPress uses to decide which template file to use to display a page. It checks files in a specific order from most specific to most general.
Click to reveal answer
beginner
Which template file does WordPress use to display a single blog post?
WordPress first looks for single-{post-type}.php (like single-post.php), then single.php, and if none exist, it falls back to index.php.
Click to reveal answer
intermediate
Order the template files WordPress checks for a category archive page.
WordPress checks category-{slug}.php, then category-{id}.php, then category.php, and finally archive.php before using index.php.
Click to reveal answer
intermediate
What template file does WordPress use for the homepage if a static front page is set?
If a static front page is set, WordPress uses front-page.php first. If that doesn't exist, it uses the template file of the selected page (usually page.php), then index.php.
Click to reveal answer
beginner
Why is understanding the template hierarchy important for WordPress theme development?
It helps developers know where to put template files to control how different pages look, ensuring the site displays content correctly and efficiently.
Click to reveal answer
Which template file does WordPress use first for a single post of type 'post'?
✗ Incorrect
WordPress first looks for single-{post-type}.php, so for a post type 'post', it looks for single-post.php first.
If WordPress cannot find category-{slug}.php or category-{id}.php, which template does it use next for a category archive?
✗ Incorrect
After category-{slug}.php and category-{id}.php, WordPress uses category.php before falling back to archive.php or index.php.
What template file is used for the homepage if no static front page is set?
✗ Incorrect
If no static front page is set, WordPress uses home.php to display the blog posts index.
Which template file is the ultimate fallback in the WordPress template hierarchy?
✗ Incorrect
index.php is the last fallback template WordPress uses if no other specific template matches.
For a custom post type archive, which template file does WordPress look for first?
✗ Incorrect
WordPress looks for archive-{post-type}.php first for custom post type archives.
Explain how WordPress decides which template file to use when displaying a page.
Think about how WordPress checks for files from the most specific to the most general.
You got /3 concepts.
Describe the template files WordPress uses for category archive pages and their order.
Remember the naming pattern and fallback sequence for category templates.
You got /5 concepts.