Create Custom WordPress Page Templates

Sometimes, you may not want all of our WordPress pages to look exactly the same. You can easily create multiple page templates so that you can diversify the look of your WordPress blog so your whole blog does not look exactly the same. Here’s how:

Using your FTP program, browse to your theme’s folder. This would be located at:

WordPress Home Folder > wp-content > themes > theme name

Now that you are in your theme’s folder, most themes will name their page template “page.php”. Download that file to your computer, and then open it using a plain text editor such as Notepad or Notepad++. On the second line, add the name you would like to assign to your new WordPress page template. Each page template has to have a unique name. It is important that you enter the page name exactly like this:

<?php
/*
Template Name: Test Page
*/

You would replace “Test Page” with whatever unique name you want to assign to your new page template. You can create as many page templates as you want.

Now, save and close the file. The next step is to rename the file. Again, each file should be named something different. For example, you could have page.php, page-test.php, page-third.php, etc. Once you’ve renamed the file, upload it to your theme’s folder.

New WordPress Page Template
Selecting your page template

Now, when you go to edit or create a new page, you should have the option of selecting the page template you have just created. The WordPress page template name will appear as whatever you’ve entered at the top of the page as shown above and not the name of the actual file.

Of course, your new page template will look exactly like your original page template until you modify the contents of the file. It’s up to you as to what you choose to change on your new WordPress page template.

For example, if you look at my homepage, you will see the rotating post box on the top of the page. Now, if you visit another page on the site, you will see that it no longer appears on the top of the page. Also, if you view any of the PHP lessons pages, you have the option to print the page, while this option is not available on the non-tutorial pages.

What changes you make to the content of your new WordPress page template is up to you and what you choose to do with it. I can’t really go in to detail as to how to change everything on your page, because each WordPress blog is unique and everyone has something different they want to do. As time goes on, I will be posting how-to articles on specific customizations you can make with your WordPress pages.

As a starting point, I would recommend reading the instructions that come with the WordPress plugins that you use to see how you can manually implement them into your theme. You can use this information to get creative and add your personal touch to each of your WordPress pages by creating multiple page templates.

About

Twitter Digg Delicious Stumbleupon Technorati Facebook Email

4 Responses to “Create Custom WordPress Page Templates”

  1. Cool tutorial! I will keep my eye out for some of your specific lessons so I can get a better understanding of what I can do, since Im not that familiar with the coding.

  2. Man John, your blog pages are FLYING lately! You must have one of the quickest loading blogs I know of, and you actually have a lot of stuff on the pages.

    Tell us some of your secrets!

  3. Thank you, thank you, thank you John Robinson This information (if action is taken by the reader and meself) will be a useful guide and is defintely one for printing out and referring to again and again

  4. Thanks for the information. It seems all the tutorials I find on this topic say the same thing. For some reason I can’t seem to get it to work on one of my sites. It may be something going on in the theme itself. I will keep trying. Thanks again.

Follow Us

We'd like you all to stay in touch with Triphp , it would very much be appreciated if you would follow us on the following social networks,we may even follow you back :).