Add divs within list categories
-
I am trying to use wp_list-Categories to create an index page on all posts (they are all recipes) on a Page. That was the easy part. I also need them to expand and collapse accordion-style. Using a script from Project Seven to implement, very handy, except I have to be able to put a div around each child
-
So wp_list_categories spits out this;
<ul> <li>Main Category 1</li> <ul> <li>Child Category 1</li> <li>Child Category 2</li> </ul> <li>Main Category 2</li> </ul>
But I need it to spit out:
<ul> <li>Main Category 1</li> <div> <ul> <li>Child Category 1</li> <li>Child Category 2</li> </ul> </div> <li>Main Category 2</li> </ul>
Is there any way I can make this happen?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add divs within list categories’ is closed to new replies.