Hi guys,
I’m developing a new wordpress site starting from an old theme based on Visual Composer.
I’ve got a custom post type Portfolio (around 500/600+ posts), each post has a gallery created with a custom shortcode of visual composer.
I’ve created a small function based on a regex to extrapolate the media ids, and i want to add them in a Gallery custom fields.
Do you have advice on how to proceed?
Thank you very much!
Founded the solution in ACF documentation.
$medias = [23556,23586,23635];
update_field('gallery', $medias, $post_id);