For a Page template you don’t add the theme name – you add what is described here:
http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates
and you put it in the theme folder.
which theme folder? I am using Dark Ritual, so I put the new page template in that folder? I did that and it errors out when it tries to load the header include.
Rudolf, here is what I did:
opened DarkRitual/page.php and resaved it as custserv.php in the same folder. This is going to be my customer service page with a contact us form. I added:
<?php
/*
Template Name: CustSevTemplate
*/
?>
to the top of the file and resaved it to the DarkRitual folder. I then opened up my manage-> pages -> customer service page and changed the theme to CustServTemplate, saved it and went back to my index. When i click that page, I get the error where it cannot load the header. What am i doing wrong?
(just for the record: theme and template are not interchangeable words in WP)
According to your description you did the right thing.
Okay, this does not work. If I create a copy of my page or index file (renaming it) and use it as a Page Template, it cannot load the header file, and assuming it would error out at any other include when it got to them. Here is what I need to do, is there a better way to do it?
Look here: http://www.crawlmag.com/wordpress
The green links on the left need to go to Pages, i.e. “contact us” – “customer service” – “subscribe” and other static content pages. Obviously to subscribe you need to fill in a form, same with a contact form, so I need to basically create a page that looks like the rest of my Theme, but allows me to run code inside the body. You cannot do that in Pages w/o installing plugins. So, what is the best way to create pages that look just like my main Theme pages, what files do I need to copy/rename?
and why are my page.php and index.php files inside my Theme exactly the same code?
Rudolf said: “or a Page template you don’t add the theme name – you add what is described here:
http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates
and you put it in the theme folder.”
But that page says this:
To create a new Template for a Page you must create a file. Let’s call our first Page Template for our Page snarfer.php. At the top of the snarfer.php file, put the following:
<?php
/*
Template Name: Snarfer
*/
?>
so you do have to ad the name, how else would you select it?
Got it figured out.
Now I’m having DIV tag issues 🙂
lovely day.