Created
September 23, 2020 11:35
-
-
Save tarecord/dcffd5457c1fb447191b04de19a8223a to your computer and use it in GitHub Desktop.
Sign in With Google - Adjust redirect after successfully authenticating
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* functions.php | |
**/ | |
add_filter( 'siwg_auth_redirect', 'redirect_users_after_login', 10, 1 ); | |
/** | |
* Filter the url redirection after user authenticates with Google. | |
**/ | |
function redirect_users_after_login( $redirect_url ) { | |
// Always redirect users back to home page. | |
return get_home_url(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment