1
votes

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.)

1

1 Answers