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

Creating a custom post archive template - WordPress Tutorial

From the course: WordPress: Custom Post Types and Taxonomies

Start my 1-month free trial

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…

Contents