I'm trying to upload some associated media to a custom post type.
file_put_contents() I'm uploading an image and trying to set an ACF image field to be the path to that file.
But reading the documentation I apparently need to supply an
attachment_id as part of the
update_field parameters. However, if I insert the image with
wp_insert_attachment (to get an attachment id) it's going to be set as the featured image, will it not?
How can I get an attachment_id without overriding the pre-existing featured image?