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

Modifying the single template header - WordPress Tutorial

From the course: WordPress: Custom Post Types and Taxonomies

Start my 1-month free trial

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…

Contents