Home › Forums › General Issues › Update posts after altering checkbox option › Reply To: Update posts after altering checkbox option
You have 2 problems.
1) You’re using a checkbox field. Checkboxes are array fields and the values stored in the database are serialized arrays. You can’t update the values in these fields with a simple query. In fact, I don’t thing that any query directly on the DB will work. I would suggest trying this tool https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
2) You also need to update the field definition. Setting a value to a value that does not exist in the fields “choices” will cause the field to show no value the next time the page is loaded for edit. The field definition is stored as a serialized array in the “post_content” column of the “acf-field” post. If you use the tool I mentioned above, it will replace these as well.
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.