According to the Codex at http://codex.wordpress.org/wp_nav_menu,
the following classes should be applied to <li> menu-item elements generated by wp_nav_menu():
- .menu-item (all <li>'s )
- .menu-item-has-children (where applicable)
- .current-menu-item (where applicable)
- .current-menu-parent (where applicable)
- .menu-item-home (if there is a link to site's front page.
However, I'm not seeing any of these -- not on the theme I'm working on, nor on twentythirteen, twentyfouteen, or underscores.
Instead, I'm only seeing the classes that are listed as only being present for backwards compatibility with the old wp_page_menu() output:
- .page_item
- .page_item_{id}
- .current_page_item
- .page_item_has_children
I can't find any code or filters in any of the three themes I checked that would override the default class behavior, nor do I have any such code in my own theme.
Am I missing something incredibly obvious here? The fact that I can't find anyone else asking why these calsses aren't showing up makes me think that I might be. Is there something else that I need to do to get the "standard" CSS styling classes to show up?
I'm on WordPress 3.8
header.php has:
wp_nav_menu( array( 'theme_location' => 'primarynav' ) );
functions.php setup function has:
register_nav_menus( array(
'primarynav' => __( 'Primary Site Navigation', 'newthemetextdomain' ),
) );
HTML output (excerpt -- I'm using test data, so the nav menu is more extensive than it would be in production)
<li class="page_item page-item-174 page_item_has_children current_page_ancestor current_page_parent">
<a href="http://127.0.0.1/DevWP/?page_id=174">Level 1</a>
<ul class='children'>
<li class="page_item page-item-173 page_item_has_children">
<a href="http://127.0.0.1/DevWP/?page_id=173">Level 2</a>
<ul class='children'>
<li class="page_item page-item-172">
<a href="http://127.0.0.1/DevWP/?page_id=172">Level 3</a>
</li>
<li class="page_item page-item-746">
<a href="http://127.0.0.1/DevWP/?page_id=746">Level 3a</a>
</li>
<li class="page_item page-item-748">
<a href="http://127.0.0.1/DevWP/?page_id=748">Level 3b</a>
</li>
</ul>
</li>
<li class="page_item page-item-742 current_page_item">
<a href="http://127.0.0.1/DevWP/?page_id=742">Level 2a</a>
</li>