Home › Forums › Backend Issues (wp-admin) › Set image as featured image › Reply To: Set image as featured image
Hi there
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!
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.