Home › Forums › Feature Requests › Collapse flexible content fields › Reply To: Collapse flexible content fields
It has been awhile and I was thinking that this shouldn’t be to difficult and the basic function isn’t!
I created a small function that creates a button for each flexible field on the page and when clicked it toggles the .-collapsed
class to the fields. I’ve not tested this in depth, but adding this to your functions.php
gives you the basic feature.
https://gist.github.com/mvaneijgen/41fbf1088c5fbc3b948c481cdea93dd8
I’ll be testing this out and if there are any changes I’ll update this gist
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.