Home Forums Add-ons Gallery Field Removing images from a repeater or gallery field


Removing images from a repeater or gallery field

  • To remove a value from the repeater or gallery field, how would you go about this from the front-end of wordpress? I assume the delete_field() API function is purely to remove the field completely!

    • Elliot

    • October 28, 2013 at 4:12 pm

    Hi @vividentity

    Yes. Instead, please use the update_field function. This will override the old value with the new value.

    To update the gallery field, just provide the $value as an array of attachment ID’s.

    To update a repeater field, just provide the $value as a multi-dimensional array containing rows of data which contain the sub field values.

    You can read more on the docs page


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.