i have some doubts on what i am actually supposed to use to create drop down menus.By just looking at theme twenty ten,i have ,

<div id="access" role="navigation">
              <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
                <div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div>
                <?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
                <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

In the comments its written "If one isn't filled out, wp_nav_menu falls back to wp_page_menu..."

When writing the css for the drop down menus,does it mean i have to write one for the menus created in the apprerance->menus wp admin backend and one for when the navigation from the wp admin backend is not available.

1 Answer 1


"If one isn't filled out, wp_nav_menu falls back to wp_page_menu..."

Means, if you do not create a nav menu from the Menus section in the back end, then as a fall back, wp_page_menu will be used (Check the fallback parameter for wp_nav_menu, it is set to wp_page_menu by default). It completely depends on how you implement it in your theme. You can use wp_list_pages instead of wp_page_menu as your fallback. The CSS you apply will be applied relative to the container class menu-header. You can use whatever class you want to wrap the menu.


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.