Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I would like to extend the walker class so that I can show a menu in this format:

<div class="accordion" id="accordion2">

  <div class="accordion-group">
    <div class="accordion-heading first">
      <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse1">
        Top Item
      </a>
    </div>
    <div id="collapse1" class="accordion-body collapse">
      <div class="accordion-inner">
        <li>menu item</li>
        <li>menu item</li>
        <li>menu item</li>
      </div>
    </div>
  </div>

</div>

I've seen a couple of examples and read the WP Documentation, but I'm still a bit lost on where to start to get it working for this particular issue. Will the start_lvl method start off my submenu items the same way as it did for parent items?

If anybody has seen a solution to this issue before, I'd greatly appreciate a point in the right direction.

share|improve this question
2  
ul, ol, and menu are the only valid parents of an li tag. –  Milo Oct 11 '13 at 20:19
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.