Home › Forums › ACF PRO › Image from ACF gallery as "featured image." › Reply To: Image from ACF gallery as "featured image."
it depends on:
the most easy thing is for sure to have a additional Image field (not required) where user can select that image. (optional create a filter or savepost action to set WP featured image to that field)
also easy would be to use the first image of the gallery when additional yes/no field after gallery is set to true.
a little more difficult would be to get a random, or the last image of the gallery.
possible but probably not failsave is to let user select or type the image countnumber. and use that if possible, else use first image.
if you are good at coding:
create a additional fieldtype that create a drop-down with image and filename out of the gallery (something that works like relationship but for gallery) probably done with js
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.