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.
Modifying the single template header - WordPress Tutorial
From the course: WordPress: Custom Post Types and Taxonomies
Modifying the single template header
There's one more modification we want to make to our single business template, and that's to remove some of the header information. Things like author and date are not necessarily important to a business directory listing. So, let's go back to our code and, you can see that our header information is in another template part. So, let's go ahead and create that in our child theme. In the template parts directory, we need to create a new directory called header. And, in the header directory, we're going to create a new file called entry-header-business.php Then, we'll copy 2019s template parts header entry-header and we'll paste that into our entry header business template. Since we're working with a business, here; date, author, and the comment count aren't entirely important. So, we're going to delete that entire section of code. Starting right below the entry-meta div, which is around line fifteen, we will delete everything up until the closing span tag. Now, we'll save this header…
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)
-
-
-