Support

Account

Home Forums General Issues Get_fields() returns false until I update the post Reply To: Get_fields() returns false until I update the post

  • Thank you John.

    I found a helper function called acf_maybe_get_field() – my plan is to use this function to get the field keys of each field.

    I will use wp_insert_post to create the post.

    Then after successful post creation, I will use update_field with the field key to update the post field values. This should save the data into wordpress as if i had manually added it in the wp-admin.

    From what i have found acf_maybe_get_field() is the only function that can get me the field keys even before the values exist.

    Does this sound like a solid plan?