• Resolved Seth@eyelevel

    (@setheyelevel)


    I’m using the following to generate my header navigation, but my question is what do I need to do or add to this to make the selected state stay on the parent when you navigate to a child page?

    Code:
    <?php wp_nav_menu( array( 'container_id' => 'nav', 'theme_location' => 'primary' ) ); ?>

    Or would I have to just figure this out in CSS?

Viewing 1 replies (of 1 total)
  • ‘wp_nav_menu’ creates .current-menu-parent and .current-menu-ancestor css classes (and more).

    check the corresponding area in the html code of your page(s) in the browser.
    or use a free tool such as firefox web developer add-on or firebug.

Viewing 1 replies (of 1 total)
  • The topic ‘Header navigation selected state.’ is closed to new replies.