• please help me for creating secondary navigation and how to use theme in header.php and function.php
    this is function.php section code>

    register_nav_menus( array(
    ‘primary’ => __( ‘Primary Menu’, ‘olida’ ),
    ) );

    and this is header.php code>
    <?php
    $template = get_post_meta($postid, ‘_wp_page_template’, true );
    $menu_name=get_post_meta($postid, ‘dbt_menu_name’, true );
    $menuid=get_nav_menu_locations();
    if (olida_isMobile() == TRUE) {
    $menuname = (ot_get_option(‘mobi_menu’));
    if($template==”homepage-template.php”){
    if ($menuname != ”){
    wp_nav_menu( array( ‘menu’ => $menuname,’container’=>false , ‘menu_class’ => ‘nav navbar-nav navbar-right’, ‘walker’=>new olida_description_walker2()) );
    }else{
    if($menuid[“primary”]==0){
    }else{
    wp_nav_menu( array( ‘theme_location’ => ‘primary’,’container’=>false , ‘menu_class’ => ‘nav navbar-nav navbar-right’, ‘walker’=>new olida_description_walker2()) ); }
    }
    }else{
    wp_nav_menu( array( ‘theme_location’ => ‘primary’,’container’=>false , ‘menu_class’ => ‘nav navbar-nav navbar-right’, ‘walker’=>new olida_description_walker1()) );
    }
    }else{

    if($template==”homepage-template.php”){
    if($menu_name && $menu_name!=”){
    wp_nav_menu( array( ‘menu’ =>$menu_name, ‘container’=>false , ‘menu_class’ => ‘nav navbar-nav navbar-right’, ‘walker’=>new olida_description_walker2()) );
    }else{
    if(isset($menuid[“primary”]) && $menuid[“primary”]!=0){
    wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘container’=>false , ‘menu_class’ => ‘nav navbar-nav navbar-right’, ‘walker’=>new olida_description_walker2()) );
    }
    }

    }else {
    if(isset($menuid[“primary”]) && $menuid[“primary”]!=0){
    wp_nav_menu( array( ‘theme_location’ => ‘primary’,’container’=>false , ‘menu_class’ => ‘nav navbar-nav navbar-right’, ‘walker’=>new olida_description_walker1()) ); }
    }
    }
    ?>

    Thanks

  • The topic ‘I want to add two navigation for home page & innerr page in single page website,’ is closed to new replies.