Home › Forums › General Issues › Create a post with custom fields with php › Reply To: Create a post with custom fields with php
Are you creating the custom fields from scratch and adding them to a field group, ie. outside of the post itself? If so, set up a sample custom field group and choose PHP export – you’ll get a PHP file that you can include in your script that you can tweak to add new custom fields to the field group.
On the other hand, if you’re just adding content to a post during post creation, I think you can save the custom field content as meta data: http://codex.wordpress.org/Function_Reference/update_post_meta.
But don’t quote me on that! There’s probably an ACF method to add data to posts on creation. 😀
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.