10 thoughts on “Add Custom Message on WordPress Login Page”

  1. Poonam, so how could I center that text correctly with CSS? I tried but failed and the text stays aligned to the left. I am relatively new to WP so I guess my skills lack. Please advise, thanks.

      • Poonam,

        Thanks for the reply. Where does the p element go? In the php functions? I am not sure where to put it exactly. I tried to see an example but it didn’t help me.

        I am trying to center the text and then I plan to enlarge the font and change the font-family.



        • John just put the below function in your theme’s functions.php file

          //* Add custom message to WordPress login page

          function smallenvelop_login_message( $message ) {

          if ( empty($message) ){

          return “<p style="text-align:center;">Your message......</p>


          } else {

          return $message;



          add_filter( ‘login_message’, ‘smallenvelop_login_message’ );

  2. Hey very nice site!! Man .. Excellent .. Amazing .. I’ll bookmark your site and take the feeds also…I am happy to find so many useful information here in the post, we need develop more strategies in this regard, thanks for sharing. . . . . .

  3. Poonam,
    Awesome post you have here.
    So what if I have that custom message to be below the login form, say under the ‘Back to Site’ link text?
    How do you achieve that?


  4. Hey Poonam, very cool site and cool content. Has already helped me a few times. Maybe you can help me out I’ll try to customize your code….
    return “Welcome to SmallEnvelop. Please login to continue“;
    } else {

    Instead of “SmallEnvrlop” I want to integrate the page name…. I think that should be this: it should look like this:

    …return “Welcome to “;
    } else {…

    But it doesn’t work like this. Do you possibly have an idea?
    Thanks Poonam,


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.