For example I have a WooCommerce product, and it has two taxonomies:
product_cat // category of product
product_brand // brand of product
I want to create a list of categories for specific brand. So when user visits brand page he can view it as a tree (like on [[LINK href="http://www.zappos.com/rieker"]]http://www.zappos.com/rieker[[/LINK]] )
I can get list of categories like so:
But how can I filter them to display only categories that have products with specific brand? And is it possible to display number of items in each category in a fast way?
Daniel Yoen answers:
why you not use hierarchical taxonomies ?
Daniel Yoen comments:
I think, you can't do that, because no relations, but, you can use hierarchical taxonomies, llike this :
This is not an option, unfortunately, as same brand can have different parent category.
Yakir Sitbon answers:
How you setup your product? And how you want filter by brand? Is it custom page for that or what?
Product post type simply has two taxonomies - category and brand.
Yakir Sitbon comments:
OK, how you want to filter? How i can know which brand you use?