Get $500+ of the best After Effects files, video templates and music for only $20!
WordPress Cheat Sheets: Template Heirarchy Map

WordPress Cheat Sheets: Template Heirarchy Map

This entry is part 4 of 4 in the series WordPress Cheat Sheets

Next in line for our WordPress Cheat Sheet series, The Template Hierarchy Mapl! If you haven’t seen the first posts in this series, this is a new batch of these quick pocket guides that you guys n’ gals can download, save to your phones for a fast reference, or even print out and keep next to your desk while you’re working on customizing WordPress to do your bidding.

This particular cheat sheet is a glossed up version of the WordPress Template Hierarchy. It shows the full priority list of how template files within your theme are loaded. Do you need all of these files? No, of course now – you really only need the index.php file, but for individualized layouts for each type of content, you’re probably going to want to use at least a handful of these in your theme. This cheat sheet pairs nicely with the last one in the series as well: The Theme Anatomy Model.

The idea here is simple: A quick visual model that can be a great helper when trying to wrap your brain around what goes into a WordPress theme for the first time (or the thirtieth!). It doesn’t include everything that you’ll need to know, but it’s a simple model that should pair nicely with coded tutorial on the site, like this one we just started: WordPress Theme Development Training Wheels .


Don’t Miss…

Don’t miss out on our full Developing Your First WordPress Theme series, or our Guide To Creating a Child Theme in WordPress, which plays right into the content of this cheat sheet.

Oh, and we’ll be doing our best to keep these sheets updated as WordPress grows into new versions, but if you spot an error (or just want to send some love), let us know in the comments!


Other parts in this series:WordPress Cheat Sheets: Theme Anatomy Model
Brandon Jones is epicera on Themeforest
Add Comment

Discussion 12 Comments

  1. Nick Koster says:

    Again, a great post! Very useful :)

    One typo though: “Do you need all of these files? No, of course [b]now[/b] – you really only need the index.php”

    Cheers!

  2. Konstantin says:

    Although not as sexy as this, I think Chip’s new Template Heirarchy diagram is more complete and easy to understand. Thanks for the post though! :)

    • Brandon Jones says:
      Author

      Nice share! It’s tough to find the balance between simplicity and thoroughness – Chip’s definitely represents the latter in great fashion :)

  3. very useful for beginner of wp development and I have download it to my pc. Good job and well done.

  4. Armando E. Lopez Jr. says:

    I was redirected here from your Article at .netmagazine

    You’re my new Internet Hero Brandon Jones HAHAHA

    Thanks for these freebies :D

  5. Another great resource. You guys here at Envato have helped me so much… And I’ve only scratched the surface the articles. Anyhow… I like this cheat sheet more than others because is has the conditional statements used in themeing for each template file. Nice.

  6. m79 says:

    muchas gracias !!!

  7. Flo says:

    Using home.php and is_home() may often cause problems in WP 3x.
    I think this kind of cheat sheet must have a warning about that because the newbies will not understand why their code doesn’t work altough THE cheat sheet shows it will be.

    • Brandon Jones says:
      Author

      True… then throw in the front-page.php file and a custom index.php and it gets a more complicated (more than a simple cheat sheet will ever really help with) :)

  8. TutsPress says:

    Looks very nice tutorial Brandon.

  9. Viktor says:

    What exactly is the difference between home.php and front-page.php?

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.