I am almost to the end, but there is one thing I dont find. One ?
I have a variable in my $_GET, and I would like that value be passed in ac_form when using it, that variable being the content of an acf field, in order to have it filled in the added record in my_pre_save_post ! and I do not find !
A second thing, wp_insert_post does not take care of the format of the post, i.e. “aside”,”gallery”, etc …
$post_id = wp_insert_post();
and it does not work, eventhoug the post is inserted !
Thanks for the post.
You should be able to target any ACF value from post data using the following syntax:
I also believe the post format should be set within the loop.
I hope this helps.