WordPress.org

Support

Support » Themes and Templates » Twenty Eleven » [Theme: Twenty Eleven] Custom menu hilight

[Theme: Twenty Eleven] Custom menu hilight

  • Does anyone know how to hilight custom menus for those pages that do not appear on Appearance > Menus?

    For instance, I have a legal page that I don’t want to show on the main navigation. Therefore when this page is visited, no tabs are hilighted on the main navigation. I want to make a custom hilight shown as the Home tab when the user is on the legal page.

    So I’m tring to do something like this:
    <?php if (is_page(‘legal’)) { echo (is_home() ‘class=”current_page_item”‘; } ?>

    Please help 🙂

    http://wordpress.org/extend/themes/twentyeleven/

Viewing 1 replies (of 1 total)
  • If you make the legal page’s parent your home page (under ‘page attributes’ when you are on the legal page editor) you can then use the css class .current-page-ancestor

    Once you have that set up, just give .current-page-ancestor the same styles as .current-menu-item

Viewing 1 replies (of 1 total)
  • The topic ‘[Theme: Twenty Eleven] Custom menu hilight’ is closed to new replies.
Skip to toolbar