Home › Forums › General Issues › Custom field not populating on new post › Reply To: Custom field not populating on new post
You can’t insert or update meta values when inserting or updating a post, which I assume you are trying to do. You need to use update_field() to update the custom field after you have inserted the post. https://www.advancedcustomfields.com/resources/update_field/. And you will need to use the field key when updating the field in this case. See the documentation for more information.
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.