WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 1 down vote accepted

"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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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