From the course: WordPress: Custom Post Types and Taxonomies

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

The WordPress template hierarchy

The WordPress template hierarchy - WordPress Tutorial

From the course: WordPress: Custom Post Types and Taxonomies

Start my 1-month free trial

The WordPress template hierarchy

- [Instructor] WordPress has some pretty great fallbacks for new content. So we technically don't need to do anything to have our post types supported on the front-end. However, we may want to customize those templates. Understanding the template hierarchy is key to doing that. On the screen here, you can see a nice visualization of the WordPress template hierarchy. We'll work through this, left to right, but I do want to point out the entry all the way to the right. Everything boils down to the index.php template. This is the ultimate fallback. This also means that WordPress themes only really needed two files, style.css to define the theme, and index.php to drive it. That said, the hierarchy is very robust and flexible. Let's dive in. To the left, you have the big overarching sections, and there are six of them. You can picture these as the main types of templates. As we move to the right, those sections are broken down. Archive Page, for example, has Author, Category, Custom Post…

Contents