• 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-login

    I’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)
  • @twd

    In the WordPress admin area, go to Settings > General. In there you’ll find Membership section and a checkbox that says “Anyone can register” – simply uncheck that and save. The option to register should then be removed.

    Thread Starter ImageTWD

    (@twd)

    Yeah thanks. But I still need users to be able to “register” as part of a subscription signup workflow.

    I just don’t want them registering on the Login Page.

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.