menu_class causing a div having the class name in wordpress -


i have script

<?php                                                              $menu=array(                'theme_location'=> 'primary',                'menu'=> '',                'container'        => false,                'container_class'  => '',                'container_id'     => '',                'menu_class'       => 'nav sf-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($menu);?> 

its intended show menu ul class="nav sf menu"

but problem when view source page, see script

<div class="nav sf-menu"> <ul> <li class="current_page_item">< href="http://localhost/model.com/" title="home">home</a> </li> <li class="page_item page-item-2"> <a href="http://localhost/model.com/?page_id=2">sample page</a> </li> </ul> </div> 

how div coming on,

i dont it, can me in issue??

since there's no menu id specified, it's falling call wp_page_menu(), wraps div (ignoring container=>false param).

don't think there's parameter strip div wp_page_menu, can specify different fallback (or add menu theme):

fallback_cb => 'wp_list_pages' 

perhaps.


Comments