4 comments

  1. I am not sure there is a way to suppress all these links, but you can hide them with CSS:

    add_action( 'login_head', 'hide_login_nav' );
    
    function hide_login_nav()
    {
        ?><style>#nav,#backtoblog{display:none}</style><?php
    }
    

    Result:

    enter image description here

  2. Ten years later, people still search for this (I know, because that is how I landed here), and the answer seems to always be: use CSS or install a plugin.

    The CSS is merely hiding the info from view. If you don’t want the HTML to render all together for it, you need to apply some filters. Add the following to your functions.php file:

    if ( ! function_exists( my_theme_login_filters ) ) :
    function my_theme_login_filters() {
     add_filter( 'login_site_html_link' , 'set_login_backtohtml' ); //This is for the "Go back to Your Blog" link
     add_filter( 'register' , 'set_login_registerhtml' ); //For the register link
     add_filter( 'lost_password_html_link' , 'set_login_lostpasswordhtml' ); //For the Lost Password link
     
    //Repeat this function for each of the elements you want to suppress, OR
    //just change the names above to the same thing.
     function set_login_backtohtml( $url ) {
       $url = '';
       return $url;
     }
    endif;
    

    Sorry, I suck at code notations. Basically, the ‘add_filter’ lines call up each aspect of the login page you want to suppress or change (that’s the first parameter), followed by the value with which you want to replace it. You can either insert a variable here, or call up a function.

    For this example, I went with the function way to demonstrate the flexibility. You can add the HTML of your choice in the $url variable. One thing to note, however, is that the “Back To” block will only suppress the <a> tag; wp-login produces the <p class="backtoblog"> code outside of any filters that I could see. So, if in ‘set_login_backtohtml’ you set $url = "Inconceivable!";, then the resulting HTML would look something like:

    <p class="backtoblog">
     Inconceivable!
    </p>
    

    The Lost Password and Register links, similarly, are wrapped inside a <p> tag with a class of ‘nav.’

    What you can do is open up the wp-login.php (or any core) file and look at all the lines that call apply_filter. Each one of these is something you can change in your functions.php file with the add_filter() methods. DO NOT CHANGE THE CORE FILE ITSELF! Just make sure you study the filter you want to manipulate carefully.

    Hope this helps!

  3. just go to htdocs->then ur site->wp-login.php page and
    find
    function login_footer($input_id = ”) {

        comment this line //printf( _x( '&larr; Back to %s', 'site' ), get_bloginfo( 'title', 'display' ) );
    

    and if want to hide all the URL’s just comment the whole function

Comments are closed.