Skip to content

Instantly share code, notes, and snippets.

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 );

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


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