Hi guys! This is my first topic here!
when a call the function wp_nav_menu() i get this code
<div id="menu">
<ul>
<li>
.
.
.
Actually i need this scenario
<ul id="my-menu">
<li>
.
.
.
How can i remove di div wrapper and set an id to the
ul tag?? Thanks!!
CyberAlien
Member
Posted 1 year ago #
wp_nav_menu(array('menu_class' => 'my-menu', 'container' => false))
edit: doh, wasn't fast enough.
thanks for the reply!
esmi i've read the wp_nav_menu from codex but i haven't understand how to do my trick. Can you explain me what i have to do?
Look at the Parameters section of that page. There's a container parameter that you can use to suppress the enclosing div and a menu_class parameter that you can use to define the class of the ul.
So i have to tri this code
wp_nav_menu( array( 'container' => '', 'menu_class' => 'my-menu' ) );
it's ok? i can't try at this moment!
Vjacheslav Trushkin gave you the answer above. :-)
Ouch!!! i'm sorry but i haven't see that topic!! Thanks a lot!!