Two menus

Does anybody know how to code a menu so that it only includes titles with links to sections of the frontpage of a one page theme but excludes separate pages.
I would then create a second menu to access individual pages using a standard menu.
I have been struggling with this for days any help would be much appreciated.

You can add side menus to some or all pages. So, not sure what you are asking for. If you go to the menus section you can build several menus and then include them only on the page specified.

I am trying to untangle the following so that I can place the sections ‘numsections’ of my frontpage into one menu and any separate pages into another. Currently if i add my pages into my another menu they are also added to the menu below. Unfortunately I do not have the skills to separate them.

[code]


<?php
$navMenu = wp_nav_menu( array(‘theme_location’ => ‘primary’, ‘echo’ => false ) );
if ( is_page() && ! is_page_template(‘template-front.php’) ) :
echo $navMenu;
else :
if( of_get_option(‘numsection’, true) > 0 ) {
$menu_list = ‘’;
$numSections = esc_attr( of_get_option(‘numsection’, true) );
for( $s=1; $s<=$numSections; $s++ ){
$menutitle = ( of_get_option(‘menutitle’.$s, true) != ‘’ ) ? esc_html( of_get_option(‘menutitle’.$s, true) ) : ‘’;
$menu_list .= ( $menutitle != ‘’ ) ? ‘
  • ’.strtoupper($menutitle).’
  • ’ : ‘’;
    }
    }
    echo skt_iamone_str_lreplace(’’, $menu_list.’’, $navMenu );
    endif;
    ?>

    [/code

    [code]

    From the cutom function file
    // replace last occurance of a string.
    function skt_iamone_str_lreplace($search, $replace, $subject){
    $pos = strrpos($subject, $search);
    if($pos !== false){
    $subject = substr_replace($subject, $replace, $pos, strlen($search));
    }
    return $subject;
    } [/code]

    Sponsor our Newsletter | Privacy Policy | Terms of Service