The WordPress Template Hierarchy

Avatar of Chris Coyier
Chris Coyier on

Try Mailchimp today. MailChimp Tracking Pixel

A visual and linked-up version of the template hierarchy. If you work on WordPress sites, it’s good to know how everything kinda waterfalls down towards the index.php file. That file is what will be be used to render any page, unless there is a more specific one present. It looks complicated, but it allows you get pretty specific with your templating without having to do much other than plop a file in.

The newest member is `singular.php`, coming in 4.3, which covers what `single.php` and `page.php` combined do now.

Direct Link →