Hello,
I would like to do the same kind of redirect but when logging in a user with [wpv-login]
add_filter('cred_success_redirect', 'custom_redirect',10,3);
function custom_redirect($url, $post_id, $form_data)
{
if ($form_data['id']==3684){
$choice = $_POST['wpcf-club'];
if($choice == "1"){
return '<em><u>hidden link</u></em>';
}
if($choice == "2"){
return '<em><u>hidden link</u></em>';
}
if($choice == "3"){
return '<em><u>hidden link</u></em>';
}
if($choice == "4"){
return '<em><u>hidden link</u></em>';
}
if($choice == "5"){
return '<em><u>hidden link</u></em>';
}
if($choice == "6"){
return '<em><u>hidden link</u></em>';
}
if($choice == "7"){
return '<em><u>hidden link</u></em>';
}
if($choice == "8"){
return '#';
}
if($choice == "9"){
return '<em><u>hidden link</u></em>';
}
if($choice == "10"){
return '<em><u>hidden link</u></em>';
}
if($choice == "11"){
return '<em><u>hidden link</u></em>';
}
if($choice == "12"){
return '#';
}
if($choice == "13"){
return '#';
}
}
return $url;
}
Thank you
Hello,
The filter hook "cred_success_redirect" works for Toolset post/user forms, I assume we are talking about shortcode [wpv-login-form]
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-login-form
If it is, you can use WordPress built-in filter hook "login_redirect", see WP document:
https://developer.wordpress.org/reference/hooks/login_redirect/
According to our support policy, we don't provide such kind of custom codes support
https://toolset.com/toolset-support-policy/
You can also check it with our Toolset Contractors:
https://toolset.com/contractors/
And it seems you are gong to redirect user to other domain names, you need to add those domain names here:
Dashboard-> Toolset-> Settings-> Front-end Content, in section "Safe redirects"
More help:
https://developer.wordpress.org/reference/hooks/allowed_redirect_hosts/