Should anyone come across the same issue, I found that when creating the $gallery_data array I was creating an array of arrays instead of key value pairs, I ended up just running the update_field function inside a foreach with the add_image key value pair created.
$gallery_img_id = rudr_upload_file_by_url($gallery_img["original_path"]);
$acf_gallery_slug = "gallery_image_" . $counter;
$add_image = [ $acf_gallery_slug => $gallery_img_id ];
update_field('gallery', $add_image, $property_id);
$counter++;
Related Posts:
- How do I use the WP image functions in a page template?
- functions.php inject inline css
- Removing default image size list in Media Box
- Customize WordPress Media Manager – Media Window
- How to reduce original image quality on upload?
- Show/hide Widgets in Dashboard Based on Current Advanced Custom Fields Option
- Gallery images titles – get from post
- How to use max and min values of custom fields
- How to use thumbnails in gallery?
- How to display more audio file ID3 tags in WordPress
- Display gallery on top before content
- Converting html to wordpress images not showing
- Default Gallery Edit/Template Editable?
- Can I hide certain upload folders in media library [duplicate]
- Shortcode pagination not advancing
- Retrieve tags data in post body
- Run function when WordPress new multisite is created or ACF field is updated
- Having issues with a foreach inside of a shortcode with ACF gallery
- How to add ‘data-caption’ inside an anchor tag
- Help with WP gallery function, wrap gallery in div
- Restore Image Title Text
- Automatically assign video ‘poster’ value to ‘filename’ for archive listing
- Updating Media Published Date When Parent Post Is Modified in WordPress
- Get Current Post ID in functions php, meta query filter
- how can I edit flexslider in woocommerce. [Urgent]
- Custom Attachment Caption Fields
- WordPress converts media extention URL automatically to video player
- Set spesific size of featured images
- Display gallery on bottom after content
- watermarking gallery items
- ACF not showing
- How to retrieve the values of a sub-field in the first and last row of an (ACF) repeater inside function?
- Limit dimensions of “Full” size images
- Functions Error: Impacting Galleries
- Add php code to wp_print_scripts?
- Access category within rss2_head hook?
- Can set_post_thumbnail be used to remove a thumbnail?
- Can’t locate custom image sizes defined by child theme
- Programmatically add Yoast meta description after post save
- Compare meta key to current date in pre get post
- Native gallery custom html output
- Using two loops in one WordPress template
- Insert a field with PREG_REPLACE – strange behaviour
- Perform function on publish AND save (not just save)
- Check if a different page has any attached images
- Facebook OpenGraph error, Call to undefined function wp_get_attachment_src()
- Display ACF category image on archive and single template files
- Delete images from media library when user deletes an image from ACF Gallery
- Featured Image and Tags problem
- Override a Post’s URL with Advanced Custom Fields Function
- how can I change all wordpress media file url to custom cdn url?
- WordPress Function Assistance with Loop
- How to show ACF value under post/page title in wp-admin
- How to display an image before title text in menu items
- Render metabox gallery in frontend
- a SET of wordpress native galleries with title and text?
- Filter works on last selection but no others
- Customise the WordPress gallery html layout
- Put images in the media from url functions
- How to add HTML into error message
- How to update an image attachment’s alt text from a custom field when saving a post?
- Help with with my function for wordpress
- ACF Date Form in Custom Admin Field
- Assign IDs to headings in ACF using functions.php
- Reference multiple style sheets, clearing styles for permalink page, custom fields for css
- get_field() with ID in one signal filter not working
- Echo a String Based On Geolocation? [Woocommerce || ACF]
- Comment function for page
- ACF Filter return value
- Function image_send_to_editor returns emty title tag
- Return ACF Field value function
- Zip all (original) images from media gallery
- Providing fallback function and allow override by plugin
- Different body image backgrounds on different pages, posts and categories
- update_post_meta not working in function
- Move captions under gallery images in twenty fourteen theme
- Create input select image URL?
- Remove Captions from Custom Gallery function.php
- Add gallery id to rel attribe of wp_get_attachment_link
- does acf_save_post cause endless loop?
- Gallery Shortcode Function Help
- Call ACF data from functions.php [closed]
- Update post meta with wp cron
- warning: trying to access array offset on value of type bool ACF field image group
- deregister scripts on certain page
- Move Post to different category if post_meta field is 0 or is 2 days old?
- Condition OR for current user ID
- Visual Composer creating own shortcodes with vc_map() to return simple Image
- Adding class to last list item? Not WP generated
- Thumbnail images missing in WP media library
- How add body_class from wp_termmeta
- WordPress performance – send all metaboxes to function or to call it again
- WordPress as CMS: How to manage/handle images assigned to a post as full-sized background images in a slideshow?
- Shortcode for Custom Field of Media Attachment (to use with Featured Images)
- wp enqueue style on about us page
- CF7 select value get to function and reciept value from function
- Setting Active Nav item (of Pages) when you are on a Post with Category
- Increase Comment Author Gravatar Size On WordPress Default Comment Function
- Random text changing to weird icons in both admin & front end
- How about many “require_once” will affect the page load speed? [closed]