// Applies the redirection filter to users that register using Social Login
function oa_social_login_set_new_user_redirect_url ($url, $user_data)
{
return get_site_url(null, '/thank-you/');
}
add_filter('oa_social_login_filter_registration_redirect_url', 'oa_social_login_set_new_user_redirect_url', 10, 2);
// Applies the redirection filter to users that login using Social Login
function oa_social_login_set_returning_user_redirect_url ($url, $user_data)
{
return get_site_url(null, '/welcome-back/');
}
add_filter('oa_social_login_filter_login_redirect_url', 'oa_social_login_set_returning_user_redirect_url', 10, 2);
Please sign in to your OneAll account to ask a new question or to contribute to the discussions.
Please click on the link below to connect to the forum with your OneAll account.
Answers
Thanks for the help.
So I've gone ahead and added this to my child themes functions.php.
Cleared my cache. Yet, when I log in, I'm still directed to my homepage.
Am I missing something?
// Applies the redirection filter to users that register using Social Login function oa_social_login_set_new_user_redirect_url ($url, $user_data) { return get_site_url(null, '/thanks-logging-facebook-please-read/'); } add_filter('oa_social_login_filter_registration_redirect_url', 'oa_social_login_set_new_user_redirect_url', 10, 2); // Applies the redirection filter to users that login using Social Login function oa_social_login_set_returning_user_redirect_url ($url, $user_data) { return get_site_url(null, '/dashboard/'); } add_filter('oa_social_login_filter_login_redirect_url', 'oa_social_login_set_returning_user_redirect_url', 10, 2);
My site URL is www.firearmtrader.co.nz if you want to see it in action.
please open the Social Login settings in your WordPress admin area and make sure this option is set to NO:
Allow other plugins to change the redirection url that you have chosen by using a hook/filter?