• Resolved Peggy

    (@lpjjonine)


    Hello, I am new to php but trying my hardest to figure things out. I created a second navigation that I want to show up only on the home page. It should display just Brides & Grooms, and the other pages should use a different menu displaying only home. I am using the Azure theme and already registered my other nav in themes.php.

    This is what I have in themes.php:

    // This theme uses wp_nav_menu() in one location.
    register_nav_menu( ‘primary’, __( ‘Primary Menu’, ‘azurebasic’ ) );

    //register the custom menus
    function register_my_menus() {
    register_nav_menus(
    array(
    ‘top-nav’ => __( ‘Top Nav’ )
    )
    );
    }
    add_action( ‘init’, ‘register_my_menus’ );

    This is what I have in header.php:

    <nav id=”access” role=”navigation” class=”clearfix”>

    <?php if (is_front_page()) {
    wp_nav_menu( array(‘menu’ => ‘top-nav’ ));
    } else {
    wp_nav_menu( array(‘menu’ => ‘primary’ ));
    }
    ?>

    </nav><!– #access –>

    The top-nav is showing on every page but should only show on the home page. The primary navigation should show on all the other pages.

    Please help! Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Peggy

    (@lpjjonine)

    Sorry I forgot to include a link: http://troianiwebdesign.com/wedding

    Thread Starter Peggy

    (@lpjjonine)

    I also forgot to say that the navigation I am talking about is in the upper left side and is white text. (Not the big button links that have bride & groom) That is another issue I am having, I can’t figure out how to style this navigation!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Second Navigation showing on all pages but should only show on home page’ is closed to new replies.