Hello,
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 …
So,
$post_id = wp_insert_post();
set_post_format( $post_id,"aside");
and it does not work, eventhoug the post is inserted !
Help !!!
Hi @mouzaia,
Thanks for the post.
You should be able to target any ACF value from post data using the following syntax:
$_POST[‘acf’][‘$field_key’]
I also believe the post format should be set within the loop.
I hope this helps.