Home › Forums › General Issues › Avada: Adding featured images from AFC-field
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.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.