raygunray
Member
Posted 3 years ago #
I'm would like to apply a page template (products.php) to a partcular page /product-page/. I would like a navigation bar to appear only on a certain page: http://kudzuantiques.com/newKudzu/products-page/ . The rest of the pages will not have the special navigation.
At one point, I thought applying a page template was as easy as selecting it from a drop down. Now I don't see it. Is it different for 2.7?
seems you already have your page file (products.php) open it then insert
<?php /* Template Name: your template name
*/ ?>
then on your dashboard add new page then on the right youll have a drop down list then select your template name
raygunray
Member
Posted 3 years ago #
I added the code before, but what I'm missing is the Apply Template Page. It's simply not there. It should be under Attributes.
I have version 2.7.1.
i'm using 2.7.1 also but ive no problems with that. seems i can't do anything bout it anymore im sorry
Sounds like you may not have uploaded your page template to the correct folder. The Page Template dropdown doesn't appear until there is at least 1 customised page template in the theme folder.
raygunray
Member
Posted 3 years ago #
Here is what I have at the top of the products.php page:
<?php
/*
Template Name: Categories
*/
?>
<?php get_header(); ?>
<?php get_sidebar(); ?>
Still learning this PHP thing, but this looks correct. Did i put the Template Name in the wrong place or file?
ahah!!! try not to use categories try other terms,
raygunray
Member
Posted 3 years ago #
The issue wasnt the header. I deleted the comment area on my style.css in my theme. I had to redo the naming convention and it worked like a charm.
Lesson learned: don't delete the comment area on your css or WP won't be able to find it.
Thanks everyone.