Home › Forums › Add-ons › Gallery Field › update_post_meta() and gallery field › Reply To: update_post_meta() and gallery field
The string you are referring to is a serialized array. You can first create an array of ID’s, and then save the array to the DB via the update_postmeta function will will serialize the array for you!
You can also make use of the handy update_field
function here:
http://www.advancedcustomfields.com/resources/functions/update_field/
Thanks
E
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.