After using WordPress to create a theme, do not want his own landing page and address.
1. Create a new user page to take over the action related to the login
Create a new page-login.php in the theme root directory, get the user action by action, and then do different processing. Of course, you can just put the login action code inside, the rest of the new page-register.php and other pages. $action = Isset ($_request[' action ')? $_request[' action ': ' Login '; global $wpdb, $user _id;switch ($action) {case ' logout ': if ($user _id) { Wp_logout (); $redirect _to = apply_filters (' Logout_redirect ', $redirect _to, $requested _redirect_to, $user); Wp_safe_redirect ($redirect _to); } exit (); Case ' Forget ': if ($user _id) {wp_redirect (get_bloginfo (' url ')); } else {//write the process of forgetting the password here} exit (); Case ' reset ': if ($user _id) {//Here write the process of resetting the password} else {Wp_redirect (Wselibrary_getloginu RL ()); } exit (); Case ' register ': if ($user _id) {wp_redirect (get_bloginfo (' url ')); } else {//write the process of user registration here} exit (); Case ' login ': default:if ($user _id) {Wp_redirect (Get_bloginfo (' URL ')); } else {//Here Write user login process} exit ();}
2, disable the landing page of WordPress comes with
The principle is very simple, that is, to allow users to access the landing page with a direct jump to the specified page if (!function_exists (' login_protection ')) { function login_protection () { //If necessary, you can give yourself a way to access if ($_get[' superuser ']! = ' password ') header (' Location:/index.php/login '); Of course you can also prohibit everyone from visiting //header (' Location:/index.php/login '); } Add_action (' login_enqueue_scripts ', ' login_protection ');}
WordPress on the Custom landing page and disable the own landing page