Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

@dimbak 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