Skip to content

Instantly share code, notes, and snippets.

@tarecord
Created September 23, 2020 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tarecord/dcffd5457c1fb447191b04de19a8223a to your computer and use it in GitHub Desktop.
Save tarecord/dcffd5457c1fb447191b04de19a8223a to your computer and use it in GitHub Desktop.
Sign in With Google - Adjust redirect after successfully authenticating
<?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