Remove the lost password url (login page) Direct Link
-
Hi, I added this code on my functions.php page to remove the lost password link on the login page:
function disable_lost_password() { if ( in_array( $_GET['action'], array('lostpassword', 'retrievepassword') ) ) { wp_redirect( wp_login_url(), 301 ); exit; } } add_action( "init", "disable_lost_password" );
It works fine but I found out after I installed Query Monitor that in fact there is an issue with this code:
Undefined index: actionDoes anyone know what’s wrong with this code? Thank you for your help! ??
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Remove the lost password url (login page) Direct Link’ is closed to new replies.