Hello,
I use five ACF fields to enter five images.
These images should be added to the featured images in a message.
The first one is working fine (_thumbnail_id)
But the four other images are not updated or added.
This was working fine but after a Avada-update, it’s not working anymore.
PS: mayby I should address me eo Avada because this problem is Avada-related?
(In $returned_image_id1..5, the ID of the image is stored)
// Update WP post itself
update_post_meta($Post_ID_Animal, '_thumbnail_id', $returned_image_id1['attach_id']); // Update first featured image
if (!empty($returned_image_id2['attach_id'])) {
update_post_meta($Post_ID_Animal, 'kd_featured-image-2_post_id', $returned_image_id2['attach_id']); // Update second featured image
}
if (!empty($returned_image_id3['attach_id'])) {
update_post_meta($Post_ID_Animal, 'kd_featured-image-3_post_id', $returned_image_id3['attach_id']); // Update thirth featured image
}
if (!empty($returned_image_id4['attach_id'])) {
update_post_meta($Post_ID_Animal, 'kd_featured-image-4_post_id', $returned_image_id4['attach_id']); // Update fourth featured image
}
if (!empty($returned_image_id5['attach_id'])) {
update_post_meta($Post_ID_Animal, 'kd_featured-image-5_post_id', $returned_image_id5['attach_id']); // Update fifth featured image
}
Not enough information or code to tell. Are the fields you are trying to update part of the avada theme you are using? (kd_featured-image-2_post_id etc)?
Hi John,
After all, this is more a Avada problem than a ACF problem. kd_featured-image-2_post_id is indeed the fieldname of the second featured image.
I will contact Avada support for this problem 😉
Thanks for answering!
Regards.