WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven
Custom menu hilight (2 posts)

  1. ATOGrad
    Member
    Posted 2 years ago #

    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/

  2. Chris Marslender
    Member
    Posted 2 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic