Home › Forums › Bug Reports › Programmatically inserting field with update_field() does not at _field_key meta › Reply To: Programmatically inserting field with update_field() does not at _field_key meta
I’ve tried that and it doesn’t make any difference to me; It looks like the meta fields aren’t all set up unless you load the form in wp-admin then save it. I’m trying to find someway to replicate this entirely in code; Feels like need to replicate the setup when the form loads not just the save, but can’t get it.
Was there anything else you were doing in your function?
I create a post; update a couple of fields (some simple text, one a repeater) then call the acf/save_post action but there’s still nothing there when I pull back the post meta, until I load and save via the wp-admin user interface.
I read a post elsewhere saying that they were creating the JSON for the field structure and posting that but I’m not sure how to go about getting hold of that.
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.