WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am customising the login page and would like to alter the footer text that takes the user back to the website. Ideally and as an example, changing it from the first image, to the second just below:

  1. enter image description here

  2. enter image description here

I've searched around a bit but can't seem to find the answer I'm looking for in modifying the text. The closest I have is changing the Register or Lost your password? text, but can't apply this script to the third user option.


function back_to_site_text( $translated ) {
     $translated = str_ireplace(  '← Back to My Site', 'Head back to My Site',  $translated );
     return $translated;

add_filter('gettext', 'back_to_site_text');
add_filter('ngettext',  'back_to_site_text');

How do I change the footer text on the login page that takes the user back to the main website?

share|improve this question
up vote 5 down vote accepted

You have the wrong values , you can't use , instead use the right encoding which in that case is ← and also %s for the title.

Also you only want this to run on two pages.

function back_to_site_text( $translated ) {

    if ( in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) )
        $translated = str_ireplace(  '← Back to %s', 'Head back to My Site',  $translated );
        return $translated;
 add_filter('gettext', 'back_to_site_text');
share|improve this answer
Keep in mind that RTL people might use a different arrow ;) – kaiser Oct 18 '13 at 6:13
Does this cause all text rendered through the system to go through this function? I like this solution better - I think the javascript technique is very hacky. Nice. – cale_b Oct 18 '13 at 14:24
More or less yes (as far as I know) , but the function above will only run on 2 pages since I added a conditional. – Wyck Oct 18 '13 at 15:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.