Hi, I'm trying to add a second page template (named page2.php) to the theme so that I can use the default page template for most pages and the new page template for a different page. The only difference is that the new page template does NOT include the sidebars. I uploaded the new page template to the theme folder but it does not appear in the pulldown template list when I want to add a new page. I tried your suggested theme reactivation step but that did not result in the new page template appearing either. Any ideas on what I should try next?
Thank you in advance for any help,
DLMST
You probably know that page templates should start with this piece of code, right?
< ?php
/*
Template Name: Your Custom Page Template
*/
?>
Peter
(blushing) Ooooops ... nooooooooooooo ... (I merely copied the original page template and took out the code that called up the sidebars).
Do I write it like this?
< ?php
/*
Template Name: page2.php
*/
?>
I added the code .... Thank you!!
stjones911
Member
Posted 2 years ago #
Same problem (WP 2.9 on localhost with .htaccess file). This code was copied out of pages-page.php in the Theme Editor, so the file is definitely visible:
<?php
/*
Template: pages-page
*/
?>
I also tried "pages-page.php" as the "Template:" entry.
Maybe I'm not finding the list to select it from; I've only found a list (labeled "Template") when I Quick Edit the Page I'd like to use the template. The only entry in that list is "Default Template". Thanks in advance.