W3 Mind Logo
Home » How to Create a Custom Page Template in WordPress

How to Create a Custom Page Template in WordPress

First of all, you need to add below code in a new file and save as my-page-template.php.
This code simply tells WordPress that this is a template file and it should be recognized as “My Page Template”. You can change the template name anything you want as long as it makes sense to you.


<?php /* Template Name: My Page Template */ ?>

After creating the above php file. Upload your file inside /wp-content/themes/directory.
Now you need to login to your WordPress site & create a new page. On the page editing screen, You’ll see a template drop down menu. Clicking on it will allow you to select the template you’ve just created.

About Author
Picture of W3Mind

W3Mind

W3Mind focuses on Blogging, Make Money Online, SEO, Business Blogging, Social Media, WordPress, Internet Tools, Web Design and Development.
Give it a Share
Facebook
Twitter
LinkedIn
You May Also Like
How to
START A
BLOG
(step by step)
Load WordPress Sites in as fast as 37ms!