Site logo

Archived topic

Menu Highlight Issue when using WooCommerce

3 replies · Started by David on November 28, 2022

Viewing posts 1–4 of 4

Hi, when viewing the WooCommerce store: https://dev.kitchenfoodco.co.uk/shop/ or a level 1 category, the 'Shop Online' primary nav button correctly highlights green. However, when you enter a subcategory or a product, the highlight disappears e.g. https://dev.kitchenfoodco.co.uk/product-category/christmas-specials/christmas-grazing/ or https://dev.kitchenfoodco.co.uk/product/childrens-box/. Can you please advise on how to ensure the menu highlight stays on these pages or category levels. Thanks! David

Hi David,

Unfortunately this isn't something the theme can control.

Looks like WooCommerce (or WordPress) adds current-menu-parent current_page_parent current_page_ancestor classes to level 1 category:
https://www.screencast.com/t/TKFLQEw2yfDl

But not for the subcategory or single product:
https://www.screencast.com/t/T5C6fECG6y7b

So there isn't a custom class we can target.

You could try checking with WooCommerce' support team to see if this can be changed somehow - I believe it's the same behavior for post categories though.

Thanks Leo

No problem :)

This archived topic is closed to new replies.