Learn WordPress
How to use page template in WordPress website

Page template is the special template which can be applied to a page or group of pages on your website. Page templates are created by WordPress theme developer to provide multiple page layout options. Generally, you’d like to have a special layout in your homepage. By default, your homepage appears in the blog layout. So, to enable you to have a special layout on your homepage, most of the theme developers create a special page template for your homepage.

Are you having the problem in using page template?
Don’t worry! In this tutorial, I’m going to show how to use page template in your WordPress website. Moreover, I’m going to create a page with special page template made for the homepage and then set it as the homepage.  I’m sure you’re really excited. So, let’s begin.

Creating a page with Page Template

Let’s start by creating a page with the page template. For demonstration purpose, I’m using Unicon Lite theme, which is freely available here. This theme has two page templates besides default template: Front Page and Blog Page. Here, I’m going to create a page with ‘Front Page‘ template.

Step 1

Login to WordPress Dashboard.

Click on the Pages >> Add New menu.

Add new page

Step 2:

Add page title as Home. You can name it anyway, but, naming according to the purpose of the page makes it easier to understand it later.

Check out the Page Attribute module on the right side of the page.  The second option should be Template where default template is selected by default. Click it and choose Front Page template.

Set Front page as template

Step 3

The front page (homepage) of Unicon theme is customized from Customizer. So, I needn’t add any content in this page. But, if you have to create content yourself in your theme, you can write content.

Publish the page to make it available for homepage use.

publish the page

Your page has been published with Front Page template. But, doing it doesn’t make it homepage of your website. It only makes it ready for front page layout. Now, you’ve to set it as the homepage.

Set Static page as homepage

By default, the blog page is set as your homepage. Now, you’re going to learn how to set the static page that we created just before as the homepage of our website.

Step 1

From your WordPress Dashboard, click on the Settings >> Reading menu.

Go to Reading settings

Step 2

You’ll see that ‘Your latest posts’ is selected by default for Front page displays. Click on the radio button titled ‘A static page‘. 

click on static page radio button

Step 3

Now, select the page that you created with ‘front page’ page template for the Front page.

Select the static page you created for homepage

Click on the Save changes button.

Now, when I visit the front page of my website, I will see the page with ‘Front Page’ layout. This theme allows me to fully customize the front page from customizer. So, next step depends upon your theme feature.

Static homepage

 

Wrapping Up

Hope the tutorial was helpful for you. If you get any problem in creating the page with page template or setting that page as home page, please leave a comment below. I’ll help you in the best way possible.

We have many other WordPress tutorials on the way. So stay tuned.