Site divided into Two sections, how to specify different navbars?

  • TSinclaire

    #1933

    I have a site with two different sections, and I want only certain pages related to the section to show up on appropriate pages.

    I tried this:

    <?php /* The navigation menu */ ?>

    <div id=”header-menu-wrap”>

    <?php

    /* Header menu */

    if ( is_page (‘resume.php’) ) {

    $args = array(

    ‘container’ => ”,

    ‘menu_id’ => ‘header-menu’,

    ‘exclude’ => ‘140’,

    ‘menu_class’ => ‘menu clearfix’,

    ‘fallback_cb’ => ‘graphene_default_menu’,

    ‘depth’ => 5,

    ‘theme_location’ => ‘Header Menu’,

    );

    if ( ! $graphene_settings )

    $args = array_merge( $args, array( ‘walker’ => new Graphene_Description_Walker() ) );

    wp_nav_menu(apply_filters(‘graphene_header_menu_args’, $args)); ?>

    <?php if (($search_box_location = $graphene_settings) && $search_box_location == ‘nav_bar’) : ?>

    <div id=”top_search”>

    <?php get_search_form(); ?>

    <?php do_action(‘graphene_nav_search’); ?>

    </div>

    <?php endif; ?> }

    ?>

    </div>

    And several other variations, none seem to work.

    Can someone help?

    TSinclaire

    #17919

    I was able to remove the navbar on certain pages with this code:

    <?php /* The navigation menu */ ?>

    <div id=”header-menu-wrap”>

    <?php

    /* Header menu */

    if (is_page(‘services-2’)){

    $args = array(

    ‘container’ => ”,

    ‘menu_id’ => ‘header-menu’,

    ‘menu_class’ => ‘menu clearfix’,

    ‘fallback_cb’ => ”,

    ‘depth’ => 5,

    ‘theme_location’ => ‘Header Menu’,

    );}

    else

    {

    $args = array(

    ‘container’ => ”,

    ‘menu_id’ => ‘header-menu’,

    ‘menu_class’ => ‘menu clearfix’,

    ‘fallback_cb’ => ‘graphene_default_menu’,

    ‘depth’ => 5,

    ‘theme_location’ => ‘Header Menu’,

    );}

    But how can I specify one of my custom created menus for ‘fallback_cb’ => ”

    TSinclaire

    #17920

    FYI for anyone who needs info:

    Create your custom menu, name it and save it.

    on the if (is_page(‘yourpage’)) code section, add:

    ‘menu’ => ‘yourcustommenuname’,

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!