I have the following code in place for a custom menu area:
$wp_nav_header = array(
'container' => '',
'menu_class' => 'sf-menu',
'fallback_cb' => 'wp_page_menu',
'theme_location' => 'primaryheader',
'depth' => 0,);
wp_nav_menu( $wp_nav_header);
It works fine when there is a menu in place, and outputs:
<div id="nav-main">
<div class="sf-menu">
<ul><li...
However, when it’s falling back, it outputs:
<div id="nav-main">
<ul id="menu-default" class="sf-menu"><li...
Needless to say, this is throwing off my design as it’s adding these classes (for which I have no styling) & stripping suckerfish , but makes my nav disappear (despite showing up in source).
Anybody encounter this before?
Thank you!
basically you are missing the container div so if you change your fallback to a custom function you can pass parameters to wp_page_menu that give you a bit of control over it and add your missing div try:
Hope this helps