Issue with redirect after creating a new post with acf form
-
Using: Advanced Custom Fields PRO
Version: Version 5.4.8Following your documentation the return/redirect doesn’t work. There is an issue with the buffer. I had to use this in order to make it work:
ob_get_clean();
Full code which redirects to home page:
ob_get_clean(); acf_form_head(); get_header(); ?> <div id="content"> <?php acf_form(array( 'post_id' => 'new_post', 'post_title' => true, 'post_content' => true, 'return' => add_query_arg( 'updated', 'true', home_url() ), )); ?> </div>
I will leave this as not resolved because it is an issue with the plugin.
Yet the above code works.
- The topic ‘Issue with redirect after creating a new post with acf form’ is closed to new replies.