Home › Forums › ACF PRO › Glitch when generate a gallery field via PHP › Reply To: Glitch when generate a gallery field via PHP
When you use update field the way you are using it you need to use the field key and not the field name. The reason that you need to save it in the back end to get it to work on the front end is because the field key is not being updated properly.
See “field_key vs field_name” here http://www.advancedcustomfields.com/resources/update_field/#field_key-vs%20field_name
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.