I've replaced the Wordpress logo with my own logo on the login page, and added a message above the login form. When a customer clicks the login button and is successfully authenticated, the custom message immediately disappears, but it takes a second or three of page loading to move/redirect to the target page.

I'd like to replace my logo with an animated gif logo, so it is clearer that the page is loading. Failing that, I'd like to leave the custom message in the same place, so customers won't be as confused. I've seen this page (https://codex.wordpress.org/Customizing_the_Login_Form ) for modifying the login page, but what I'm looking for doesn't seem to be there. I'd rather not use a plugin, unless it's the only way to do this.


/* Add message above login form */
function wpsd_add_login_message() {
    return 'My Custom Message';

add_filter('login_message', 'wpsd_add_login_message');

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

function register_text( $translating ) {
    $translated = ''; // here goes the translation
    return $translated;

function my_login_logo() {
    echo '<style> Here goes my CSS styles</style>';

add_action( 'login_enqueue_scripts', 'my_login_logo' );
  • What do you mean by "message"? Please edit the post to show us the code. – Max Yudin Jul 17 '19 at 16:23
  • I added my code above. I'm doing this because we get too many people misspelling their usernames, but many browsers automatically save the username. So I want the form to take usernames, but the label asks only for email addresses. – Edward S Bernstein Jul 17 '19 at 16:47
  • There is no any connection with user-added data in jour codee – Max Yudin Jul 17 '19 at 20:04
  • Hmmm. the customization I added (Max asked me to 'show my code') has been edited out. But whatever. I didn't think that what I did was changing the behavior of the page, I was asking how to insert content into the login page after the "login" button has been clicked, but before the processing of the login has completed and the browser is sent the target page. – Edward S Bernstein Jul 17 '19 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.