applying different template to page
-
Hi All,
I have a number of stand alone pages that I would like to display minus the sidebar. I think I understand how to make a custom page template but how do I apply that template only to those specific pages?Thanks.
-
If you have more than 1 Page template (i.e. the default page.php + at least one) – in the Write Page area there will be a Page Template dropdown to select the template you want. The option is NOT visible if you don’t have Page templates…
cool
thanks a ton!hmmmm i’m missing something. When I create my new php page I can’t see anywhere in the edit or create page area to choose it.
Maybe you didn’t read carefully: you do NOT create new php pages – you create new Page Templates!
I’m super confused 🙂
I created a page2.php file in my theme directory. At the top of the file I put the following:
<?php
/*
Template Name: page2
*/
?>When I go to write a page the only options I see are Discussion, Password-protect post, Page parent, Post slug, Post author, and Page order.
Am I missing something?
Thanks for the help and the patience…
Hrmm… it should be between Parent and Slug.
Those little blue boxes are all Ajax’d up. If you drag a few around to re-order them, does Template pop up?
Nope… I drag those boxes all over the place… no page template to be found.
You’re positive it’s in the current/active theme’s directory?
What happens if you change page2 to something without “page” in the name? (yes, I’m grasping)
I’m positive.
I even tried the same proceedure in the default theme. Same results.I’ve tried renaming to half a dozen different names, each time changing the “Template Name:” field within the file.
you do not see a page template dropdown at all ? or you are not seeing page2 as an option in the dropdown ?
did you make sure, you have the page2.php on the active theme’s directory ? this dropdown only pulls it from the active theme’s directory.
That is exactly correct,
1) I do not see (and have never seen) a page template dropdown.
2) The page2.php (or whatever name I call it) file is in the active theme’s directory.
3) I have tried adding another page template to other themes (ie default), and making them active, but have the same results.That’s totally strange. On a local install (XAMPP) I tried to reproduce your error: made a page2.php in the default theme and I copied over even the heading for template name as you posted above – but it shows up normally in the dropdown.
Actually, the Default comes with more than one Page templates, so the dropdown should be there regardless of your own template!I wonder if it could be an installation issue. Do you need any special rights on the theme folder?
Well, I’ve tried a completely new install and got the same result.
My hosting is on Godaddy.com
Is there any other information that could be helpful?
You should have started with that!
Try to search for goddady here in the forum.
Also, you are a Win server, which can always cause surprising things…
The topic ‘applying different template to page’ is closed to new replies.