classic-template-hierarchy

Installation
SKILL.md

Classic Template Hierarchy

Use this when deciding which PHP template file a classic theme should contain, or when auditing why WordPress loads the wrong template.

This is a classic PHP theme skill. Do not apply FSE/block-template assumptions such as templates/page.html.

When to Use This Skill

  • Adding page.php, single.php, archive.php, 404.php, or similar template files.
  • Debugging front page vs blog index behavior.
  • Converting static pages into WordPress templates.
  • Creating custom page templates.
  • Reviewing template_include, template_redirect, get_template_part, or child-theme override behavior.

Loader Model in WP 7.1

wp-includes/template-loader.php checks query conditionals, asks a get_*_template() function for candidates, then falls back to index.php.

Important WP 7.1 details:

Installs
1
GitHub Stars
22
First Seen
1 day ago
classic-template-hierarchy — lonsdale201/wp-agent-skills