Skip to content

Instantly share code, notes, and snippets.

@danjjohnson
Created April 25, 2016 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danjjohnson/f971bd7d7d0c9dec02c30af146620266 to your computer and use it in GitHub Desktop.
Save danjjohnson/f971bd7d7d0c9dec02c30af146620266 to your computer and use it in GitHub Desktop.
Redirect login url to custom page
add_filter( 'login_url', 'my_login_page', 10, 2 );
function my_login_page( $login_url, $redirect ) {
return home_url( '/login-page/?redirect_to=' . $redirect );
}
@dimbak
Copy link

dimbak commented Jun 3, 2021

Hi, I dont think works anymore. I see 'sign in' not login and it produces this type of URL

Https://hello.com/submit-resume/?redirect_to=https://dbtest.gr/simple/submit-resume/?job_id=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment