List of WooCommerce products categories only associated to another custom taxono
-
I’ve got a custom taxonomy “sector” associated to WooCommerce products; of course each products are assigned to the default Product categories (“product_cat”) as well. What I’d like to achieve is to show in a custom sidebar a list of “Product category” link/name, the product of which are assigned to the selected “sector”.
Eg.: say that my data ar organized like this (hope this make sense), with three products associated to a various “Product categories” AND to a particular sector:
Product 1
- product_cat: category_1
- sector: sector_1
Product 2
- product_cat: category_2
- sector: sector_1
Product 3
- product_cat: category_3
- sector: sector_1
Now, when I’m in the “sector_1” archive page, in the sidebar I’d like to show the following list:
- category_1
- category_2
- category_3
Is this possible? Maybe using tax_query or other methods?
- The topic ‘List of WooCommerce products categories only associated to another custom taxono’ is closed to new replies.