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:
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.
functions.php:
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?
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.