Support » Themes and Templates » How to get different menus to display on different pages

  • I am using this theme:

    I am trying to get the primary menu (menu bar) to display a different set of links depending on which page you are on.
    For instance, if you are on the “Military” page if will display a certain menu in the primary menu section. If you are on the “Residential” page it will display a different array of links from the Military page but in the same area.
    I have created the custom menus for what I want displayed on each page. I just need to implement them.

    I’ve read a ton of different forums for an answer and I am lost.
    I’ve tried editing the functions and header php but nothing has worked yet. The functionality of the menu in this theme seems to be called up in the index.php:

    <nav id="navigation">    
        spyropress_logo( array(
            'brand' => true,
            'link' => is_front_page() ? '#home' : home_url('/#home')
        ) );
        if( has_nav_menu( 'primary' ) ) {
            $menu = spyropress_get_nav_menu( array(
                        'menu_id' => 'menu',
                        'container' => false,
                        'echo' => false,
                        'menu_class' =>false,
            $url = is_front_page() ? '#' : home_url('/#');
            echo str_replace( '#HOME_URL#', $url, $menu );

    (I’m not very technical when it comes to php so please be specific in your reply on where I am changing/adding things)

  • The topic ‘How to get different menus to display on different pages’ is closed to new replies.