WordPress.org

Ready to get started?Download WordPress

Forums

current-menu-ancestor class not showing up in nav menu of mixed type items (1 post)

  1. skarck
    Member
    Posted 3 months ago #

    I'm using wp_nav_menu to show a multi-depth menu consisting of different types of items, p.e:

    • Page
      • Custom Taxonomy term archive
      • ...
    • ...
    • ...

    When I'm on 'Page' the first level item has the class current-menu-item as intended.
    When on the term archive 'Page' has the class current-menu-parent' and the archive menu itemcurrent-menu-item`.
    All good so far.

    When I now visit a post that has the archive's term assigned the sublevel term menu item has current-menu-parent but the 'Page' has no current-*class at all.

    Is this an intended behavior?
    Since it seems a bit illogical to me, is there any fix how to mark the all items of the menu branch with classes if any of its sub items has a current-* class?

    thx

Reply

You must log in to post.

About this Topic