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 post archive template - WordPress Tutorial
From the course: WordPress: Custom Post Types and Taxonomies
Creating a custom post archive template
- [Instructor] With improvements made to the brand, new single-business template, let's turn our attention to the business listing page, which is an archive page. You can see that it's pretty plain-looking, and it turns all of our logos blue, so let's make some changes. Let's open up our code editor to the twentynineteen parent theme, and we're going to copy the archive.php file. Then, in our child theme, we're going to paste it and rename it archive-business. Next, we're going to find the function call for the archive title. This dynamically grabs the title based on the archive page we're viewing. Since we'd like this just be labeled as a business directory, we're going to change this line. Let's make note of the h1 class here. We'll actually copy that, and then we'll delete this entire php call in between the opening and closing header tags. We'll paste the h1 tag, and then we will use the internationalization print function to print out the words All Businesses. And we'll use the…
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)
-
-
-