WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like my wp_nav_menu to output in the format for jquery ui:

<h3>Section 1</h3>
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
<h3>Section 2</h3>
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
suscipit faucibus urna.

The list has two levels. I've successfully changed the top level, but I'm having trouble with the second level. How can I do this? Is there an easier way than extending the walker class?

share|improve this question
Showing your code and what you've tried is a prerequisite to asking questions on this site. Else it will be closed as "do this job for me"-question. – kaiser Jul 25 '13 at 19:58
Why are you using wp_nav_menu to produce something that doesn't really look like a menu? – s_ha_dum Jul 25 '13 at 20:15
@s_ha_dum This is the format used by jQuery UI by default for their accordion menus. – Jordan Jul 25 '13 at 22:58
@kaiser I've solved my own question. I'd post the answer, but it says I can't for 8 hours. – Jordan Jul 25 '13 at 22:58
@Jordy Just post it in 8 hours. You can later mark it as solution. – kaiser Jul 25 '13 at 23:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.