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

Could someone please give me the Wordpress default navigation output, i've searched it around but havn't found it.

I would like the example navigation to also include one sub-menu link.

Or if someone could point me out to a link where i could find information about this and customizing, thanks.

share|improve this question
I do not understand this question. – s_ha_dum Jan 26 '13 at 0:07
up vote 0 down vote accepted

wp_nav_menu is what you are looking for.

Here are some examples.

Using the depth parameter you can change the level of sub-menu.

0 leads to all levels.



$defaults = array(
    'theme_location'  => '',
    'menu'            => '',
    'container'       => 'div',
    'container_class' => '',
    'container_id'    => '',
    'menu_class'      => 'menu',
    'menu_id'         => '',
    'echo'            => true,
    'fallback_cb'     => 'wp_page_menu',
    'before'          => '',
    'after'           => '',
    'link_before'     => '',
    'link_after'      => '',
    'items_wrap'      => '<ul id="%1$s" class="%2$s">%3$s</ul>',
    'depth'           => 0,
    'walker'          => ''

wp_nav_menu( $defaults );

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.