Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

WordPress template hierarchy

Koen edited this page Aug 1, 2019 · 4 revisions

WordPress has a template hierarchy, which means it will automatically look up templates based on which page is requested.

Example: if you're requesting the configured front page, it will first look for a front-page.php file. If it's not there, it will fall back to templates lower in the hierarchy:

front-page.php -› template-<name>.php -› page-<slug>.php -› page-<id>.php -› page.php

See the visual overview to get a better impression.

WordPress template hierarchy