Categories
WordPress

The WordPress Template Hierarchy

The video below explains one of the most important concepts in WordPress theme development: the template hierarchy. Specifically, if you are making a theme, it’s important to know which of the theme files will actually generate your content.

The diagram used in the video is available in the WordPress codex, along with some excellent examples: https://codex.wordpress.org/Template_Hierarchy

An easy-to-grasp graphic cheatsheet at NetTuts does a really good job summing up these ideas:

And from a related NetTuts tutorial, a basic page anatomy diagram.