• Resolved bjobst

    (@lqdmbr)


    I’m using my product categories as main nav menu. When a product is associated to multiple categories, every menu item is highlighted on single pages.
    How can I assign a current-primary-cat-product class to the wordpress menu so that I can address it with CSS?

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @lqdmbr,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    We have a guide here where you can set a primary category: https://rankmath.com/kb/how-to-choose-a-primary-category/

    However, please note that our plugin doesn’t handle the behavior of the highlighting of your menu so we suggest checking with your theme author instead.

    What we can share right now is where our primary category is stored in the meta, which is useful when you wish to access it via your theme to achieve your desired behavior of the menu. That meta key is rank_math_primary_category

    Hope that helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Product categories as main nav menu – highlight primary cat’ is closed to new replies.