From the course: WordPress: Custom Post Types and Taxonomies
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
The WordPress template hierarchy - WordPress Tutorial
From the course: WordPress: Custom Post Types and Taxonomies
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
(Locked)
The WordPress template hierarchy4m 9s
-
(Locked)
Setting up your child theme5m 47s
-
(Locked)
Creating a single custom post template3m 14s
-
(Locked)
Modifying the single template header4m 1s
-
(Locked)
Creating a custom post archive template3m 56s
-
(Locked)
Adding a custom taxonomy to a template4m 1s
-
(Locked)
Creating a custom taxonomy template2m 35s
-
(Locked)
-
-
-