Classic Template Hierarchy

Choose, create, or audit classic PHP WordPress template files for WP 7.1 using the template hierarchy. Covers `template-loader.php`, `index.php` fallback, `front-page.php` vs `home.php`, page/single/archive/taxonomy/search/404/attachment templates, `get_template_part()` with `$args`, child-theme override order, `template_include`, the `is_sitemap()` conditional, and why `template_redirect` should not include-and-exit. Use when deciding which classic template file to add or reviewing page.php/404.php/single/archive behavior.

Lonsdale201 Updated

File contents

Lonsdale201/wp-agent-skills/tree/main/theme-development/classic-template-hierarchy commit 7e16d5834a

Frequently asked questions

npx skillmds@latest add lonsdale201/classic-template-hierarchy