Skip to:
Content
Pages
Categories
Search
Top
Bottom

Sub-Menu navigation: keeping the parent page tab highlighted when on a subpage

  • I currently have the main buddypress up in the header of my theme, and then another navigation list displayed in certain pages using “wp_list_pages(‘title_li=&child_of=’ .$post->ID.)’

    I’d like to keep the main navigation highlighted when i browse to these pages. I’ve tried accessing the style using .current_page_parent a{css !Important}. But i can not even modify the style of the links in the main navigation menu.

    What’s the best way to add hierarchical navigation which leaves the parent pages tab highlighted?

    Edit: I can modify the style of the tab using
    #nav li.current_page_item a { background: #333333; !important
    color: #b2b3b6;
    font-style:italic;
    !important}

    but
    #nav li.current_page_ancestor a { background: #333333; !important
    color: #b2b3b6;
    font-style:italic;
    !important}

    does not work

    Thanks

    Edit: fixed

  • The topic ‘Sub-Menu navigation: keeping the parent page tab highlighted when on a subpage’ is closed to new replies.
Skip to toolbar