• Hello,

    I have been using wp_nav_menu consisting of multiple categories(pages) and their children(sub-menu) and driving the active menu item through css.

    The issue is that when I have a post with multiple categories, it creates multiple menu items with with the class “current-menu-item” and “current-post-ancestor” assigned to it.

    I would like a way for only the first category of the post to be shown as the “current” menu item.

    should I edit the nav_menu_template.php? or maybe deactivate the second/third category while the menu generates itself and put it back afterwards?

    Thanks in advance,

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Multiple categories on single post creating multiple current-menu-items’ is closed to new replies.