Return to Support

Page Specific Header Menu/Primary Menu

Home Forums Graphene WordPress theme Support Page Specific Header Menu/Primary Menu

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10753
    GWMO
    Member

    I’m currently expanding my Web site at http://gwmo.com/gwmo to include both business and non/not-for-profit sections and need a different header/primary navigation bar for each section.

    After reading through the forum, I learned how to add and remove the secondary menu from specific pages, thank you Syahir and planning to use it in the future, but was not able to find anything about changing the header/primary menu on specific pages.

    Since it appears to be controlled by header-menu-wrap set in the Appearance > Menu Manage Locations, I’m not sure if a new page template would work. Perhaps something like the following in the functions file?

    < ?php

    if ( is_page_template('template1.php') ) {

    wp_nav_menu( array('menu' => 'Menu1' ));

    } else {

    wp_nav_menu( array('menu' => 'Menu2' ));

    }

    ?>

    *copied from CSS-TRICKS since I’m not a PHP expert.

    #46694
    Stahlbrust
    Member

    Hast du es schonmal so in der Art probiert? Glaube aber das entfernt sämtliche Header Menus:

    .menu {

    display:none;

    }

    .tinynav {

    display:none;

    }

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.