Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

David Klotz
19,659 Pointsbootstrap accordion expand all/collapse all in wordpress
A while back I coded a bootstrap accordion for an html webpage, and added the an "expand all" and "collapse all" button using the code at http://www.bootply.com/peFUdnwOpZ
It wasn't perfect but it worked well enough. However I am now building the site into wordpress and cannot get this to function. I was wondering if anyone has any experience trying to do this and how they might have solved the problem. My accordion is loading content dynamically, however when I dropped the static html into the page the expand/collapse all button doesn't seem to work either.
1 Answer
Kyle Adams
5,571 Pointsare you using wp_enqueue_script() to link your javascript file to your content?
David Klotz
19,659 PointsDavid Klotz
19,659 PointsHey Kyle, thanks for responding, I've tried enqueuing and alternatively placing in footer.php with the same result.