How do I create a custom archive page depending on the custom taxonomy type?
-
16-10-2019 - |
Pergunta
I've created a custom taxonomy called 'productCategories' using register_taxonomy()
function. I've set the rewrite slug to 'products'.
My question is: How do I render a different template to archive.php
for my custom taxonomy /products ?
Thanks, Jon
Solução
Create a template file called taxonomy-productCategories.php
. For more information, see the Template Hierarchy. I find this image particularly helpful.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a wordpress.stackexchange