Support

Account

Home Forums ACF PRO FR: acf_form return to permalink Reply To: FR: acf_form return to permalink

  • I updated the code from the first poster. You can’t check for is_admin, because it returns true (Ajax call is made to admin). See Documentation

    https://codex.wordpress.org/Function_Reference/is_admin

    //Custom redirected after creating a post
    function custom_redirect_function_name($post_id) {
    		$redirect = get_the_permalink($post_id);
    		wp_redirect($redirect);
    		exit;
    }
    add_action('acf/save_post', 'custom_redirect_function_name', 20);

    $redirect can be anything you want in my case it is as follow’s

    $redirect="/thank-you/?listing_id=$post_id"

    I wanted an url like this to process some further actions based on user choice (option to upgrade to different levels)