Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a menu structure that looks like this:

Categorie 1
- Sub Category
- Sub Category
Categorie 2
- Sub Category
- Sub Category
Categorie 3

But I only want to show the active category with it's subcategories on the product archive and product detail pages. Like this:
Category 3
- Sub Cat
- Sub Cat

The woocommerce widget shows all the categories and only the subcategories from the active category so I think it's not that hard to fix it but I can't find a solution on the internet

(I fixed it by making different custom menu's and an if else function but with products in multiple categories it doesn't work well.)

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.