Can Custom Taxonomy archive and Term archive use the same file?
-
Hey Guys
For my new site I built a category page (category.php) that means I can browse a top level category (/category/culture/) and a subcategory (/category/culture/reviews/) and they both utilise the same page (category.php)
Now I have a Custom Post Type (recipe) with a custom taxonomy (recipetypes – Meal, Snack etc)/ Browsing /recipe/ displays archive-recipe.php, but get_term_link for any of the taxonomy terms returns a URL containing the taxonomy i.e. /recipetypes/meal/
But I want this to use the same page template, it’ll essentially filter all recipes by the term selected, so I want the URL to be /recipe/meal/ and have this link to archive-recipe.php where I can extract the term for my WP_Query.It’s probably easy but this is my first theme and any advice would be appreciated ??
Cheers
- The topic ‘Can Custom Taxonomy archive and Term archive use the same file?’ is closed to new replies.