How can I remove the “Register” link on the login page?
-
I need to keep the “Forgot Password” link, obviously.
But there is no reason to have the “Register” link.
Hiding it with CSS doesn’t deter bots either, of course.So there must be a filter or a code snippet to remove it completely?
fyi I am using a custom login url
e.g. thesite.com/custom-loginI’ve seen this code snippet but it doesn’t seem very robust.
If I change the login page to something OTHER than /wp-login.php (as above)
I don’t think it would work.add_filter('option_users_can_register', function($value) { $script = basename(parse_url($_SERVER['SCRIPT_NAME'], PHP_URL_PATH)); if ($script == 'wp-login.php') { $value = false; } return $value; });
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘How can I remove the “Register” link on the login page?’ is closed to new replies.