Linking to category pages
-
I wanted to make sure I understood the template hierarchy logic/link structure properly before launching into building out the category “main” pages and regular pages look-and-feel. I’ve read a couple of pages referring to this, but it’s not working.
I’ve created 4 categories with simple one-word slugs. I created 4 associated category-[slug].php files in my theme dir. How do I physically link to these category “main” pages–for example, from a custom header.php nav menu? Deep-link all the way into the themes directory? (This seems weird)
Right now, none of these work:
/root/category-[slug].php
/root/[category slug]/category-[slug].php
/root/wp/wp-content/themes/mytheme/category-[slug].php –why would I do this??Or maybe I’m circumventing an already built-in WP function? (ie: Should I be using a PHP loop to create my header.php nav menu using WP variables?)
A little confiuzzled here…
The topic ‘Linking to category pages’ is closed to new replies.