March 2020
Beginner
660 pages
18h 28m
English
We don't have any page templates by default in our child theme. This means that the Template setting on the pages screen is not enabled until we create a template. WordPress uses the Template Name value in the comments section to identify the page templates:
<?php /* Template Name: Product Landing Page */ ?>
Once a comment with Template Name is added, WordPress will consider that file as a page template. The name of the template is the value we define after the Template Name key.
In step 7, we added the elements for the product template. Here, we used a copy of the default page.php template with minor modifications. We removed the comments section and added a new header called Product Page.
Next, we used this template while ...
Read now
Unlock full access