Support

Account

Home Forums Add-ons Gallery Field update_field gallery image without deleting existing

Unread

update_field gallery image without deleting existing

  • 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.

Viewing 1 post (of 1 total)

The topic ‘update_field gallery image without deleting existing’ is closed to new replies.