editting wp_nav_menu() so it prints DIVs instead of LIs

admin

Administrator
Staff member
I have a header navigation with kinda difficult hover effect.
In order to make it dynamic and NOT hard-coded, I'm gonna have to use spans inside list elements or even better I'm gonna need entire navigation done using DIVs.

Is there a way to edit the wordpress function wp_nav_menu() (<a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu" rel="nofollow">codex definition</a>)
so that it will give me divs that I want instead of ul-li hierarchy?

Another solution is to build it the common way but then append spans to it using jQuery. But that's my last resort.

Has anyone had similar experiences?

Thank you

Edit:

instead of

Code:
&lt;ul&gt;
  &lt;li&gt;...&lt;/li&gt;
  &lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;

I'm gonna need:

Code:
&lt;div class="x"&gt;
 &lt;div class="y"&gt;
   &lt;div class="z"&gt;
   &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class="y"&gt;
   &lt;div class="z"&gt;
   &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class="y"&gt;
   &lt;div class="z"&gt;
   &lt;/div&gt;
 &lt;/div&gt;
&lt;/div&gt;