Template Files for Product Category and Product Tag Pages
Product categories is a custom taxonomy product_cat
, product tags is a custom taxonomy product_tag
, right? So, according to the template hierarchy in WordPress Codex, the files should be taxonomy-product_cat.php
, archive.php
etc?
Surprise, but no! 😁
And that’s why I decided to publish a post about it, because it is kind of unclear. It is even more unclear than with the shop page we discussed in the previous tutorial.
Look at the diagram:

page.php
single.php
(if nopage.php
exist in a theme)singular.php
(neitherpage.php
norsingle.php
exist)index.php
(if none of the above files exist in a theme directory)
I think the main reason why WooCommerce uses this template structure for product categories and tags is because the content of these pages is auto-generated by the plugin. It makes it impossible to use native taxonomy and archive templates for this purpose.
Related

Misha Rudrastyh
Hey guys and welcome to my website. For more than 10 years I've been doing my best to share with you some superb WordPress guides and tips for free.
Need some developer help? Contact me