Using gettext on wp-login.php won't change "Back to site name" text
I'm attempting to change the "← Back to sitename" text on the wp-login.php page using gettext but not having much luck.
No matter what I try it doesn't seem to want to work, although I've had success changing the "Lost your password?" text using the same method.
Here is my latest snippet
function custom_login_text ( $text ) {
if (in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) )) {
if ($text == 'larr; Back to %s'){$text = 'Test';}
return $text;
}
}
add_filter( 'gettext', 'custom_login_text' );
I've also tried directly using ← Back to Site Name
but that didn't work either. Am I missing something?
Any tips would be appreciated.
Topic wp-login-form Wordpress
Category Web