I'm using the theme Starkers, which is based on twentyten. My twentyten theme places child pages below its parent page. But the new theme (based on Starkers) I'm developing doesn't (it just places it in the first level).
My theme header.php
:
<div id="access" role="navigation">
<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
</div><!-- #access -->
<div id="branding">
<h1>
<?php if (get_option(THEME_PREFIX . "logo_image_enabled")) { ?>
<a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/<?php echo get_option(THEME_PREFIX . 'logo_image'); ?>" /></a>
<?php } else { ?>
<a href="<?php bloginfo('url'); ?>"><?php echo get_option(THEME_PREFIX . "logo_text"); ?></a>
<?php } ?>
</h1>
</div><!-- #branding -->
Twentyten's:
<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' ) ); ?>
</div><!-- #access -->
My theme's output:
<div id="access" role="navigation">
<div class="menu">
<ul>
<li class="current_page_item"><a href="http://localhost/bf3/" title="Home">Home</a></li>
<li class="page_item page-item-23"><a href="http://localhost/bf3/?page_id=23" title="Blog">Blog</a></li>
<li class="page_item page-item-63"><a href="http://localhost/bf3/?page_id=63" title="Home sub">Home sub</a></li>
</ul>
</div>
</div><!-- #access -->
Twenty-ten's:
<div id="access" role="navigation">
<div class="skip-link screen-reader-text"><a href="#content" title="Skip to content">Skip to content</a></div>
<div class="menu-header">
<ul id="menu-custom-menu" class="menu">
<li id="menu-item-66" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-66"><a href="http://localhost/bf3/?page_id=23">Blog</a></li>
<li id="menu-item-67" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-2 current_page_item menu-item-67"><a href="http://localhost/bf3/">Home</a>
<ul class="sub-menu">
<li id="menu-item-65" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-65"><a href="http://localhost/bf3/?page_id=63">Home sub</a></li>
</ul>
</li>
</ul></div>
</div><!-- #access -->
Twentyten adds an unordered list with the class .sub-menu
. My functions.php
was directly taken from twentyten's.
Does anybody know which file and section makes the child pages sub-menus in the wp_nav_menu
part of the header?
.sub-menu
(I added the output).