Support » Plugins and Hacks » Remove login_footer Back to Site Link

Viewing 12 replies - 1 through 12 (of 12 total)
  • Seems that there is one hook for login_footer, but that there is no real action that ads the footer link leading back to the home page. I found the code here on line 133 of wp-login.php:

    function login_footer($input_id = '') {
    	?>
    	<p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>
    	</div>
    
    <?php if ( !empty($input_id) ) : ?>
    <script type="text/javascript">
    try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){}
    if(typeof wpOnload=='function')wpOnload();
    </script>
    <?php endif; ?>
    
    <?php do_action('login_footer'); ?>

    Main snippet I do not want to load and will probably hide with CSS as I do not see another way is:

    <p id="backtoblog"><a>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>

    Added CSS to my Custom Login Plugin Custom CSS box:

    .login #nav a, .login #backtoblog a {color:white !important;}
    .login #nav a:hover, .login #backtoblog a:hover {color:white !important;}

    This until I find a way to not load or replace the earlier mentioned back home link on the login screen

    Added CSS to my Custom Login Plugin Custom CSS box:

    .login #nav a, .login #backtoblog a {display:none;}
    .login #nav a:hover, .login #backtoblog a:hover {display:none !important;}

    Hi, I want to remove the “back to” link as well, but I don’t want to use the custom Login plugin. Can you tell me what .css file I should put those two styles in?

    Awesome – thanks very much; I am looking forward to finally getting my login page just like I want it!

    I couldn’t hide the “Back To” link without also hiding the “Lost Your Password” link.

    esmi

    (@esmi)

    Forum Moderator

    Never edit WordPress core files!

    Okey doke, I edited my post that had my “resolution”.

    But after hours of research, I couldn’t get it done any other way. I did save the original as a backup, in case it didn’t work or broke something. But everything checked out smoothly.

    I read about why core files should never be edited, and I appreciate your warning. I have saved the original file, and when I need to upgrade WP, I will re-upload it. Thanks.

    Hi,I am trying to achieve the same without much of CSS and PHP editing.
    Can you please tell me the safest way to remove the “Back to” link?

    how to remove plugin links from the wordpress login homepage

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Remove login_footer Back to Site Link’ is closed to new replies.