wordpress - wp_nav_menu change sub-menu class name? -


is there way change child <ul class="sub-menu"> generated wordpress custom class name?

i know parent ul can remove or change name 'menu_class' => 'newname'

i couldnt find... tried 'submenu_class' => 'customname' :d seems logic me, no right one..

any ideas?

there no option this, can extend 'walker' object wordpress uses create menu html. 1 method needs overridden:

class my_walker_nav_menu extends walker_nav_menu {   function start_lvl(&$output, $depth) {     $indent = str_repeat("\t", $depth);     $output .= "\n$indent<ul class=\"my-sub-menu\">\n";   } } 

then pass instance of walker argument wp_nav_menu so:

'walker' => new my_walker_nav_menu() 

Comments

Popular posts from this blog

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

jQuery clickable div with working mailto link inside -