An acf frontend form is responsible of updating several images in an existing post.
The images are saved to the data but not attached to the post – which leaves the just now edited post without images.
I looked it up and it seems to be a problem many familiar with, tho the answers I found wasn’t helping me much .
I would appreciate your help guys
Here is the code:
//checking if its the images form by cheking the featured image field
$profile_pic = $_POST['acf']['field_607d6236e63ff'];
//creating array to update the current post and attach the images to it
$logo = get_field('company_logo', $post_id);
$cover_photo = get_field('תמונת_רקע', $post_id);
$data = array (
foreach($data as $item):
$update_post = array(
'ID' => $item,
'post_parent' => $post_id
Any help would be good =]
Thanks you in advance