0
0
Wordpressframework~5 mins

Custom page templates in Wordpress - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
A// Template: My Template
B# Template Name: My Template
C<!-- Template: My Template -->
D/* Template Name: My Template */
Where do you select a custom page template for a page in WordPress?
AIn the 'Page Attributes' box on the page editor screen
BIn the WordPress theme customizer
CIn the WordPress menu settings
DIn the WordPress widgets area
Which folder should custom page template files be placed in?
AIn the WordPress plugins folder
BInside the active theme folder
CIn the WordPress uploads folder
DAnywhere on the server
Can a custom page template contain PHP code?
AYes, it can contain PHP, HTML, CSS, and JavaScript
BNo, it can only contain HTML
COnly CSS is allowed
DOnly JavaScript is allowed
What happens if you don’t assign a custom page template to a page?
AThe page will use the blog post template
BThe page will not display
CThe page uses the default page template
DWordPress will show an error
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.