Adding WordPress page templates

As you may have noticed on this blog, there are currently 2 different page templates – the front page which has no side bars and the posts/other pages which has a side bar on either side. I wanted to add a third page which had only one side bar which I was going to use on sub-pages such as the MollyCam archive page.

Changing the actual page wasn’t that difficult. I simply edited the code from the double sidebar page, removing one of them. I then uploaded the page to my server via FTP to the correct sub directory. But the page wouldn’t show up in my theme. I tried renaming it, I tried changing some of the code, I tried Google, I even tried asking for help on Twitter – no luck! What had I missed!??

I’d forgotten to ‘name’ the page! Right at the top of the code, you need the following info:

/*
Template Name: Sales Page
*/

It worked! If you want to know more about creating page templates for WordPress, click here. This was very helpful to me!

Post Author: admin

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.