Home › Forums › Backend Issues (wp-admin) › Set image as featured image › Reply To: Set image as featured image
You should probably use the repeater field name.. however the code above will not magically work just setting that.
First you need to check what you’ve got in the $value variable.. I’m not sure this works but try doing a print_r($value); to see the values being saved. In the working example above the $value is just a post attachment ID. In your case with a repeater field I imagine it’s something more in line of an array or object which you’ll need to fetch the right value from.
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.