How to create new WordPress Custom Page template

How to create new WordPress Custom Page template?

How to create new WordPress Custom Page template?

If you have seen in some of the modern WordPress themes, there are several inbuilt Page templates that you can select from while creating a new page. On the Add new page menu of WP Admin, you will find a drop down below the publish button to select the page template you want to use for your new page (see below image).

How to create new WordPress Custom Page template

What is the use of having different page templates?

 No longer are the days when Blogs are different from flexible websites, nowadays, you can customize a WordPress blog to match any other website. The possibilities are infinite, you may even create a Facebook out of a WordPress CMS, Yes its possible! Page templates help you separate your different website pages based on their purpose and role in your websites. For example, you might not want the side bar on the about me page, here we will use a separate page template (without sidebar).

 

 How to create new WordPress Custom Page template?

It’s simple. Navigate to your blog directory in using your FTP manager and locate the WordPress themes folder for your currently active theme. Find the file called page.php and create a copy of it with a different name, example: page-archive.php. At the top of the PHP file, paste the below code and save.

Now you have created a new template file and it will be available from now on in the page templates drop down on creating a new page.

<?php
/*
Template Name: page-archives
*/
?>

It’s up to you to customize this template by removing or adding blocks, sessions, code etc. and use the template where ever the pages matches your requirement. Hope this article has helped you learn how to create new page templates on WordPress.

Jo

Founder of OrangeCopper Webmaster Networks, also writes for the latest Launch - HippieMonk Tech & LifeStyle Blog! Stay tuned to the Orangecopper Network of websites at our network page.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by sweet Captcha