This tutorial goes over how to create a new page template in WordPress. I show how to create a new WordPress page template that I use to start my custom homepage.
How to create a custom WordPress page template
- Open your theme files and duplicate the
page.php
file - I saved my new file called
template-home.php
into a new directory calledtemplates
in my theme files - Add
Template Name: Homepage
to the comment section of the newtemplate-home.php
file to let WordPress know this is a new template - Add or make any customizations to your new template file
- Go to the Pages section from the WordPress Dashboard and create a new page or edit an existing page and set the page to use the new template in the right hand column
- If you want to set this page to be the default Homepage you need to go to the Settings section from the WordPress Dashboard
- From the Settings menu go to Reading and set the Front Page to use the page you set the Homepage template on
- You can also set the page you would like the blog posts to be displayed on with the Post Page setting