A couple of weeks ago I was trying to get a design out so a client could review it and let us know if they wanted us to keep working on the design. Fortunately they did! I was struggling to try and figure out how I could have pages with a different template design. I wanted to have a sidebar on one section of the website with a list of subpages. I knew there was a way to do it. I had heard of it before but I couldn’t quite figure it out. I then looked through the WordPress documentation and learned about WordPress page templates and how to create them! I was relieved because I was then able to quickly get a different template for a few pages put together.
It’s really easy to do. At the top of a PHP file in your theme’s root directly, place the following code:
Template Name: Facts
Then of course you’ll pull your header, sidebar, footer and other div elements just like you normally would. After you have gotten it put together upload the file into your theme directory. Go into your WordPress administration area and edit or create a new page. On the side click on the plus sign beside page template, use the drop down to choose your newly created page template. If you were already on the page before you uploaded you may have to refresh.