Home › Forums › Add-ons › Gallery Field › Custom Fields in Gallery Array › Reply To: Custom Fields in Gallery Array
I decided to take a step back and try to hard code an example that would work for one image. I successfully got this to work:
$gallery[0][‘constrain’] = get_field(‘constrain’, $gallery[0][‘id’]);
Now I need to figure out how increment that ‘0’ in the loop for each image I have. If you have any ideas, let me know. And thanks so much for all of your help!
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.