Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sign in With Google - Adjust redirect after successfully authenticating
* 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