Support

Account

Home Forums ACF PRO Redirect Form to variable External URL Reply To: Redirect Form to variable External URL

  • You are doing this on an acf/save_post hook. That means that this happens after the post is created and this will always be true. So, none of your code is being run.

    
    if($post_id != 'new') {
      return $post_id;
     }
    

    Completely missed that this was with acf_form() and that part of your code.

    It does not even matter that this does not match the post_id setting for acf_form().

    You will need to find another way to test, maybe a combination of is_admin() and get_post_type($post_id)

    
    if (is_admin() || get_post_type($post_id) != 'post_type_listings') {
      return;
    }