I have created several custom menus that appear under the main menu on the shop page. Each category (and its subcategories) should display a different custom menu like below:
custom menu: category1 shows menu1, category2 shows menu2... and so on.
I tried to achieve this by renaming the taxonomy-product_cat.php
file to each category name in order to create different templates, but this doesn't seem to affect anything.
So I'm guessing the best solution is to modify archive-product.php
and add a conditional if (is_product_category( 'cat1' ))
that shows the menu if category "cat1"
is being displayed. It seems to be a simple solution but I can't make it work.
Any feedback is very much appreciated.
is_tax()
asif( is_tax( 'product_cat', 'cat1' ))
. Details