From the course: WordPress: Custom Post Types and Taxonomies
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating a custom taxonomy template - WordPress Tutorial
From the course: WordPress: Custom Post Types and Taxonomies
Creating a custom taxonomy template
- [Instructor] Since we modified our business template to show the taxonomy terms for size, we're exposing a new template on the front end. And that is the size taxonomy template. This taxonomy template looks exactly like our business archive before we modified it, and that's because it is. In fact, it's using the very same archive.php template to drive it. And that's good news for us. Thanks to the robust template hierarchy and the template part architecture we've been using to drive our child theme, we can fully customize the size archive by making minimal changes. If we open up our code editor, and inside our child theme we can copy and then paste the archive business template and then we can rename this template. And we'll rename it to Taxonomy dash Size. Now if we go back to the front end of our website and refresh, we'll see that the template looks exactly like the business archive. And that actually includes the title. So let's go ahead and change that. We know the original…
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)
-
-
-