Redirecting WordPress’s Login/Register page to a custom login/registration page

For this you need to redirect login/registration page to your custom pages.
So, Write this code in your functions.php file Under your activated theme folder. Pass your custom page path as a Argument.

 add_action('init','possibly_redirect');

function possibly_redirect(){
 global $pagenow;
 if( 'wp-login.php' == $pagenow ) {
  wp_redirect('http://google.com/');
  exit();
 }
}

Leave a Comment