Home › Forums › Backend Issues (wp-admin) › Set image as featured image › Reply To: Set image as featured image
Interesting post, and nearly what I need, but I can’t understand some things.
when calling the function it passes the variables ’10” and ‘3’.
add_filter(‘acf/update_value/name=sock_images’, ‘acf_set_featured_image’, 10, 3);
being the post id and the post field.
So this would only set the one image from that one post to featured.
I have a custom field called ‘gallery images’ with just one image upload field.
As I add a new gallery image, each image has a new post id. meaning the code you used to set each image as featured would not work.
I am using a gallery plugin that requires all images in custom post types to be featured.
Is this possible at all?
I would like to use the ‘gallery’ field option, or a simple repeater field.
Any help on how to achieve this would be grand.
It would be a nice feature to add in the future, a simple check box when you insert an image field ‘set this image as featured’
Thanks in advance.
Awesome plugin by the way
I need to set each of the images being uploaded to featured, not just one.
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!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.