Home Forums Front-end Issues Pass new $post_id to url or… Reply To: Pass new $post_id to url or…

  • Hi @synergywp

    The acf_form function will not create a new post by default. To create a new post, you will need to hook into the pre_save_post filter and create the post there.

    Whilst you are inserting the post, you can get the new ID from the code you write.

    Then you can modify the $_POST data which contains the redirect url.

    Take a look at the docs for examples of creating a new post with the acf form and also read through the source code core/api.php to se how the acf_form_head function works