Home › Forums › General Issues › get_fields not returning a specific value › Reply To: get_fields not returning a specific value
I’m a little confused about what your issue is, except that you said you are creating posts and inserting values using PHP. If you create a new post and add a new ACF value, then you need to use the field key when using update_field()
. If you are inserting the values yourself using SQL, the you must also insert the field key reference shown in your DB image. With a new post, using the field name in update_field() does not create the field key reference, this is why editing a post and saving the value makes it work.
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.