Support

Account

Home Forums General Issues Sorry i am lost in acf_form !

Helping

Sorry i am lost in acf_form !

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

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Sorry i am lost in acf_form !’ is closed to new replies.