Hey guys using the Wordpress Framework usually I create a custom walker that extends Walker_Nav_menu in order to make a custom wordpress menu. I did register the Menu location in the functions.php , I did hook up the menu and create a custom_nav_walker and it worked. however I cannot change the main ul root tag to put some inline code up there using the navwalker php class without using javascript.
So the nav menu html is something like this.
<ul id="Root-tag-That-I-want-to-modify" class="vertical medium-horizontal menu dropdown" <!-- I WANT TO ECHO CODE HERE USING PHP --> >
<li id="menu-item-146" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home active menu-item-146">
<a href="http://Thelink">Item</a></li>
<li id="menu-item-147" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor menu-item-has-children active has-dropdown menu-item-147"><a href="http://ThesecondLink">submeu</a>
<ul class="0 menu submenu is-dropdown-submenu first-sub vertical" data-submenu="" role="menu">
<li id="menu-item-153" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home active menu-item-153"><a href="http://anotherlink">submeu item</a>
</li></ul></li></ul>
I tried to override the start_lvl funtion that is inside the Walker class :
function start_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat( "\t", $depth );
$first = ($depth === 0) ? 'first-sub' : '';
$output .= "\n$indent<ul class=\"$depth menu submenu is-dropdown-submenu $first vertical\" data-submenu=\"\" role=\"menu\">\n";
}
After printing $depth inside the ul tag I found out that this first UL is not processed by this start_lvl
Where in this class can I override the main UL tag, I checked the wordpress call wp_nav_menu array maybe I missed something ?? I am interested in doing this with PHP without Javascript.