User Registration

  1. Home
  2. Docs
  3. User Registration
  4. How to?
  5. How to hide wordpress default login page and use user registration login page

How to hide wordpress default login page and use user registration login page

You can hook into the wordpress default login page and use only user registration login. And when trying to access wordpress login page redirect login page created by user registration. Add this in your theme’s function.php

 

add_action(  'login_init', 'user_registration_login_init'  );
function user_registration_login_init () {
     if( ! is_user_logged_in() ) {
        wp_redirect( '/login' );
        exit;
      }
}

where, /login is the user registration login page slug.

Was this article helpful to you? Yes No

How can we help?