Ready to get started?Download WordPress


Highlight current menu item (2 posts)

  1. aaronmoodie
    Posted 3 years ago #

    I'm currently trying to work out if it's possible to add a current-<custom>-ancestor class to a menu item. The menu I am working with look like:

    <menu item 1>
    <custom post cat 1 />
    <custom post cat 2 />
    <custom post cat 3 />
    </menu item 1>
    <menu item 2>
    <custom post cat 4 />
    </menu item 2>

    this is working fine, except for that when I select a post from one of the custom post cats the menu item looses it's current-menu-ancestor class, leaving only the custom post cat as current.

    has anyone had this issue?

  2. aaronmoodie
    Posted 3 years ago #

    I've removed the custom post types, and so am now just using normal posts and categories. I'm still having the same issue though. Once I select a post, the menu item is no longer highlighted as current.

Topic Closed

This topic has been closed to new replies.

About this Topic