What's WP
Our everything is about WordPress - best choice of WordPress users!
How to Create a Custom Page Template in WordPress?

How to Create a Custom Page Template in WordPress?

WordPress has huge flexibility to allow users to create their own custom page templates to meet their unique requirements. Therefore, here, we come out a tutorial to guide users to make a beautiful and proper page easily and quickly. In below, we introduce the detailed steps and paste the interface pictures step by step so that users can learn about how to create completely different looking pages on their WordPress sites.

How To Create a Custom Page Template in WordPress

To create a custom WordPress template, you have two options – you can modify the default page template or you can create one of your own. To better explain the option process, we use the latter way.

First, you need to create a complete new custom page template by opening a blank file in a plain text editor like Notepad or Notepad++, and save it as [templatename].php, like test_page.php file. You can create as any name as long as it is a .php file.

Second, add the following code in the file at the top:

Template Name: Cover Page

We call it as Cover Page, but you can replace it with any unique name that you want to use for you new page template. At last, save and close the file. This page can use all php markup as other pages can. The above code is only giving the custom template a new that you can see it later. If you want to add other content, you can use the following code for help.

<?php get_header(); ?> - Displays Header.php file content  
<?php get_footer(); ?> - Displays Footer.php file content  
<?php get_sidebar(); ?> - Displays Sidebar.php file content  
<?php comments_template(); ?> - Displays Comment.php file content  
<?php the_content(); ?> - Displays the Content of the post  
<?php the_permalink() ?> - Link of the Specific post  
<?php the_category(', ') ?> - Category of a Specific post  
<?php the_author(); ?> - Author of the Specific post 

In the next, you need to upload the file into the server under your WordPress theme folder at /wp-content/themes/theme name. So you need to have access to your WordPress setup files by using FTP client. As we will modify the files related to the theme, it’s better to take a backup before.

Now, you have created a custom page template, so how to use it?

Log into your WordPress dashboard, and add a new page.

add a new page

You can see a box called Page Attributes below the publish button, select the custom template in the drag down list. Publish the page and you can see your custom template at once.

cover page

What Custom WordPress Page Template Used for?

Now, you have created a custom WordPress page template, with which you have full control over your website page. You can design every aspect of how a particular page looks like without having to modify any design of your site or change to a different WordPress theme. As well, you can create custom WordPress page for the following usages:

  • Create specific appearance sales page for products or services.
  • Create a landing page for your organizations.
  • Create an about page for your introduction.
  • Create a portfolio page.
  • Create a custom photo gallery page.
  • Create a custom join us page for your membership page.
  • Create a funnel page to capture leads.
  • The list goes on…


Joyce is a professional writer & SEOer who loves trying new things and sharing the experience through blogging. She loves clean design, playing with different WordPress themes, SEO, etc. Now she is very struggle with purchasing a bubbling apartment in downtown. You can help her by clicking our ADs or making a purchase via our links ;-)


Want to Learn More About WordPress?

Get Our Free Themes, Plugins, Support, SEO Tips, and Other Tutorials!

Email *