Hello, how can i add images in a gallery in the front end by programmatically? I am using this:
$attachment_id_gallery[] = insert_attachment($file_id,$post_id,false);
update_field( ‘field_xxxxxxxxxxxx’, $attachment_id_gallery , $post_id );
But when i upload one or more images files, the old ones are replace by the new one. I just need to add the new one to the existing.
Excuse my english.