Support

Account

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. 😀