WordPress.org

Ready to get started?Download WordPress

Forums

Help Please On How To Remove “Back To” Link From Login Screen (11 posts)

  1. marcbkk
    Member
    Posted 6 years ago #

    My site has been setup so that it can be accessed by logging in only for site security purposes.

    On the main log-in screen there is that link which takes you back to the main page of the site. This is great if login is not required to access the site’s front page, but in the case of my site it is redundant. It is redundant because if you click on the “Back To” link it simply brings you right back to the log-in screen since the front page of the site is redirected to bring users to the log-in screen only.

    So I am wondering if there is a php file I can edit to remove the “Back To” link completely from the login screen?

    Many thanks for any help you can offer…

  2. whistler2020
    Member
    Posted 6 years ago #

    line 279 in wp-login.php

  3. marcbkk
    Member
    Posted 6 years ago #

    Thanks, I removed that whole line of code from the wp-login.php file, but still the same.

    Any other code I need to remove and/or edit to affect the change?

    Thanks.

  4. Roy
    Member
    Posted 6 years ago #

    Clear browser cache?

  5. marcbkk
    Member
    Posted 6 years ago #

    Thanks. I tried it in 2 different browsers and held down the Ctrl key each time I refresehd the page just in case. Usually would dump any browser cache.

    Try http://www.117reunion.com please and see what you get.

    Thanks.

  6. Roy
    Member
    Posted 6 years ago #

    Right, it's not your cache and the "back to" link is still in the source. Maybe Wistlers's suggestion was only a half one (or you forgot to upload the new file)? I cannot look in my own files, so besides my suggestion of 50 minutes ago, I can't help you...

  7. marcbkk
    Member
    Posted 6 years ago #

    Thanks Gangleri. I had already downloaded the file from the server after uploading it to make sure the edited one was there. I think you are right and there is something more to the code edit I still need to make it work possibly. Anyone else have any further thoughts on this please? Thank you.

  8. Jeremy Clark
    Moderator
    Posted 6 years ago #

    Just doing a quick grep on that file produced six lines where it has a link. Look on line 157 159 279 376 380 382, you need to subtract one from the last three since you already deleted line 279.

  9. marcbkk
    Member
    Posted 6 years ago #

    Thanks Jeremy. I took out the last 3 lines one by one as you sugessted and finally after I took out the 3rd one did it work.

    I seemed to have lost that notificaiton that you have sucessfully logged out now after logging back out, but who really needs that anyway.

    Thanks again. Mission complete.

  10. marcbkk
    Member
    Posted 6 years ago #

    I just put in the new version of WordPress (did an upgrade actually). Does anyone know what line to remove from the wp-login.php file to get rid of that gray colored bar at the top of the log-in screen?

  11. tobey
    Member
    Posted 6 years ago #

    A cheap and simple way to remove the gray bar is to simply edit /wp-admin/css/colors-fresh.css. Search for: #wphead, body.login and change the color to white (#ffffff) or transparent.

    Also, you shouldn't have lost the logout message. I'd upload a fresh copy of wp-admin.php and try it again.

    As far as I know, you only have to remove the last two instances of: <p id="backtoblog"><a>/" title="<?php _e('Are you lost?') ?>"><?php printf(__('&laquo; Back to%s'), get_bloginfo('title', 'display' )); ?></a>

    The second one is for the register screen and the third is for the login screen. Not sure what the first one is for, but editing it is probably what broke your logout message...

Topic Closed

This topic has been closed to new replies.

About this Topic