0
votes

For the custom post type "Product" in Woocommerce, I wish to create a custom archive page for the taxonomy "Seating".

According to the Wordpress codex the order should be "archive" then "post type" then "taxonomy"

I have therefore tried the following file names:

  • archive-product-seating.php
  • category-product-seating.php
  • archive-product-category-seating.php
  • category-product-category-seating.php

    Is it possible to create a specific template for a specific taxonomy of a post type? if so, how is this named?

    I also understand that this could be achieved by using conditional logic... I'm trying to not do this though.

  • 1
    For WooCommerce 'product' post type there is 2 custom taxonomies, product categories ('product_cat') and Product tags ('product_tag'). Also each product attribute is a custom taxonomy (pa_+ the attribute name). So may be "Seating" is not a taxonomy but a "product category" term (which taxonomy is 'product_cat' for a product category or subcategory)… So it's going to use WooCommerce template archive-product.php (with other woocommerce sub templates like content-product_cat.php and taxonomy-product_cat.php)…LoicTheAztec

    1 Answers

    0
    votes

    According to this page https://developer.wordpress.org/themes/basics/template-hierarchy/ (picture is very useful) filename should be taxonomy-product-seating.php