Advanced Sidebar Menu
[resolved] Highlighting current level 2 page and parent but not siblings ... (2 posts)

  1. M One
    Posted 2 years ago #

    Wonder if you could help me with most efficient css for this. I'm using background color to create a button menu with a hover color and active color.

    .advanced-sidebar-menu li.current_page_item a - lets me highlight the current page but when this is a parent with sub pages it also highlights all the children of the current parent page.

    The functionality I am after is - when the parent page is active it is highlighted and the children are displayed but are not highlighted.

    When a child page is active both it and its parent are highlighted but its inactive siblings are not.

    I'm getting there but feels like I'm kludging so wonder if you could point me in the right direction?

    Many Thanks.


  2. Mat Lipe
    Plugin Author

    Posted 2 years ago #

    Hi M One,

    You could try adjusting your CSS to something like this:

    .advanced-sidebar-menu li.current_page_item > a

    .advanced-sidebar-menu li.current_page_ancestor > a

    This should target only the levels you would like and no sub levels.

    Hope this helps!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Sidebar Menu
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.