Recall & Review
beginner
What is a custom page template in WordPress?
A custom page template is a special PHP file in a WordPress theme that lets you create a unique layout or design for a specific page, different from the default page layout.
Click to reveal answer
beginner
How do you tell WordPress that a PHP file is a custom page template?
You add a comment at the top of the PHP file like this: <br>
/* Template Name: Your Template Name */<br>This makes WordPress recognize it as a selectable template in the page editor.Click to reveal answer
beginner
Where do you place custom page template files in a WordPress theme?
You place custom page template files inside your active theme folder, usually in the root or a subfolder like
/templates/. WordPress looks for them there to list in the page editor.Click to reveal answer
beginner
How do you apply a custom page template to a page in WordPress?
In the WordPress admin, edit the page you want to customize. On the right side under 'Page Attributes', find the 'Template' dropdown and select your custom template. Then save or update the page.
Click to reveal answer
intermediate
Can custom page templates include custom PHP code and HTML?
Yes! Custom page templates can have any PHP, HTML, CSS, or JavaScript you want. This lets you create special layouts, add custom content, or change how the page looks and works.
Click to reveal answer
What comment must be added at the top of a PHP file to make it a custom page template in WordPress?
✗ Incorrect
The correct syntax is a PHP comment with 'Template Name' like /* Template Name: My Template */.
Where do you select a custom page template for a page in WordPress?
✗ Incorrect
Custom page templates are selected in the 'Page Attributes' box when editing a page.
Which folder should custom page template files be placed in?
✗ Incorrect
Custom page templates must be inside the active theme folder to be recognized.
Can a custom page template contain PHP code?
✗ Incorrect
Custom page templates can include PHP, HTML, CSS, and JavaScript to customize the page fully.
What happens if you don’t assign a custom page template to a page?
✗ Incorrect
If no custom template is assigned, WordPress uses the default page template for that page.
Explain how to create and use a custom page template in WordPress.
Think about the steps from file creation to applying the template in the admin.
You got /4 concepts.
Why would you want to use a custom page template in WordPress?
Consider why different pages might need different looks or functions.
You got /4 concepts.