• Most importantly, I need to remove the “Login” link that appears below the “Register” form. Strangely, I can use this to remove the “Register” link from below the login page, but it does not work to remove anything from the Register page:

    add_filter('register', 'remove_links');
    		function remove_links() {
    			unset($login_url);
    		}

    Is there any type of filter or hook I can use to remove these two links? I need to make sure only the registration form is available to prevent malicious users from accessing the login form. Any help here is greatly appreciated.
    CSS display: none will not be sufficient, because the links are actually still accessible in the page, just not visible. Removing them with jQuery is also not ideal, because this can be circumvented.
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Unfortunately there isn’t a filter that will let you actually remove the markup there. You can see on wp-login.php on lines 705-707 that those links are hard coded into the markup.

    Moderator bcworkz

    (@bcworkz)

    Why bother hiding links to wp-login.php that appear on wp-login.php? The page has been found. The only difference between the linked pages and the logon page is the “action” parameter, they all originate from the same file. Every WP hacker in the world knows how to manipulate the “action” parameters.

    Thread Starter CLehnert

    (@clehnert)

    Thanks, Nickohrn. I had a feeling that was the case. WordPress really should make this an option. Some may want their register form to be accessible without their login being accessible.

    Bc, I realize that it is the same PHP file, but even with the correct action, it is inaccessible without a certain query string. It made me feel better to remove it. Plus, it doesn’t make sense to leave links that can’t be used on the page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need to Remove Login and Lost Password Links from beneath "Register" form’ is closed to new replies.