I am pretty new in WP (I came from Joomla) and I have some doubt regarding how WordPress handles the main menu (I mean the horizontal menu in the header).

As example I use this online test website: http://onofri.org/WP_BootStrap/

in this website I have install a theme (that use BootStrap CSS framework) and in the Appearance > Menus I have a menu called Menu 1 that is correctly shown in the header (As you can see this menu contains the voices: Home, Sample Page, Google)

To show these voices I think that it use this code snippet take from the header.php theme file (Is it true?):

        <?php bloginfo('name'); ?></a>
        <?php wp_nav_menu(
                    'menu' => 'main-menu',
                    'container_class' => 'nav-collapse collapse',
                    'menu_class' => 'nav',
                    'fallback_cb' => '',
                    'menu_id' => 'main-menu',
                    'walker' => new Bootstrapwp_Walker_Nav_Menu()
            ); ?>

Ok, my doubt is related to he menu behavior in the others preinstalled theme.

For example if I change theme using the preinstalled Twenty Thirteen theme I obtain this screenshot:

enter image description here

As you can see in the header I have a "menu" that show only the Sample Page voice and not also the other 2 voices that are in my Menu 1 (Home and Google). Why?

Looking in the header.php file of the Twenty Thirteen theme I can find this code snippet that I think represent the menu navabar:

<div id="navbar" class="navbar">
    <nav id="site-navigation" class="navigation main-navigation" role="navigation">
        <h3 class="menu-toggle"><?php _e( 'Menu', 'twentythirteen' ); ?></h3>
        <a class="screen-reader-text skip-link" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentythirteen' ); ?>"><?php _e( 'Skip to content', 'twentythirteen' ); ?></a>
        <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
        <?php get_search_form(); ?>
    </nav><!-- #site-navigation -->
</div><!-- #navbar -->

I have similar behavior using all the others preinstalled theme. Why in these theme I can't see all the Menu 1 voices as in my actual theme? what is the difference?



1 Answer 1


The menu you see on your site is dependent on the theme you are using. So the same menu may or many not come up on different themes those you are using. This is because of the menu locations defined in your theme.

Different themes have different menu locations. One can have none where as another can have 3. You can visualise the available menu locations if you move to Admin => Appearance => Menus => Manage Locations section.

So in your case you see Sample Page, becasue there are no menu assigned to the primary menu location of the theme (Lets say Twenty Thirteen) you are using. In this case it just loads the pages in your site. If you will add another page, it will show up here as well. Again this functionality is as per the theme.

If you assign your menu to the primary menu location of the theme, then you will see the menu in place of Sample Page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.