Avoiding the use of wp-login.php
-
Hi there,
I tried to avoid the use of wp-login by adding a login form to a page on my site and by adding this code to my theme it’s functions.php
//REMOVE or DISABLE WP-LOGIN function remove_wplogin() { global $pagenow; if ( 'wp-login.php' == $pagenow ) { wp_redirect(get_page_link(218)); exit; } } add_action( 'init', 'remove_wplogin' );
This code redirects all incoming traffic to wp-login.php to my new login page what got the page id 218.
Bugs occurred..
First of all logging out isn’t possible any more because the function wp_logout_url() uses wp-login.php by default (same for logging in). All other default redirects like this one, go to: ../wp-admin without being logged in as admin, this will redirect back to wp-login.php (I might be wrong about this)Does someone know how to fix this or is it not possible to change (without modifying wordpress core)
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Avoiding the use of wp-login.php’ is closed to new replies.