Home › Forums › Backend Issues (wp-admin) › Update post meta when ACF checkbox choices change › Reply To: Update post meta when ACF checkbox choices change
There isn’t any good way to update field values on all posts when you change field settings.
It is possible if you write PHP. Do a WP_Query() to get all the posts, loop through the posts, get the field, check the values, remove the values for the choices you’ve removed and then update the field if needed.
If the value must be removed on the front end then I would probably build a check where the field was used in the template rather than try to update all of the posts.
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.