• Resolved rod31

    (@rod31)


    Hello there,

    I try to use update_field() function with an array of images ID to update my acf photo gallery. The images don’t appear on the list of my post gallery field but i get the correct images on front with the acf_photo_gallery() in my template. And when i inspect the code of this field, i got all the img of my other posts in the div #acf-photo-gallery-metabox-edit, have you an idea ?
    I tried to serialize my array but don’t work..

Viewing 1 replies (of 1 total)
  • Thread Starter rod31

    (@rod31)

    Hello,
    i found the solution ! We must use a string not an array().
    $img_id = implode(“,”, $array_img_id);

    • This reply was modified 4 years, 11 months ago by rod31.
Viewing 1 replies (of 1 total)
  • The topic ‘Can’t use update_field() with an array of ID’ is closed to new replies.