Home Forums Backend Issues (wp-admin) put_fields() function


put_fields() function

  • I am using get_fields() to grab all of the ACF fields from a post.

    Is there a put_fields() equivalent? I modified the array and I need to put all of the fields back. I can’t just loop through it because it has groups and repeaters.

  • So, update_field() does iterate through an array. It helps to read the docs…

    “The field’s key should be used when saving a new value to a post (when no value exists).”

    What I am curious about is can I pass an empty string to update all of the field data… But for now I am able to use a nested array to update my groups/repeaters.

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

The topic ‘put_fields() function’ is closed to new replies.