Home › Forums › Backend Issues (wp-admin) › Issue With Closing Flexible Fields by Default › Reply To: Issue With Closing Flexible Fields by Default
ACF includes a copy of layout that is uses to create a new layout by copying these. When you are setting the layouts to collapse you are also setting these copies.
your selector should look something like this… I think, you may need to inspect the html to find them and target them, but this is the general idea
$('.layout').not('.clones .layout').addClass('-collapsed');
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.