WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. M One
    Member
    Posted 8 months 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.

    http://wordpress.org/plugins/advanced-sidebar-menu/

  2. Mat Lipe
    Member
    Plugin Author

    Posted 8 months 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!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.