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:

Template hierarchy for WooCommerce product categories and tags

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

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

Follow me on Twitter