Display Custom Message on WordPress Login Page

How to Display Custom Message on WordPress Login Page

in WordPress Admin
Google+ LinkedIn

You can display your own custom message on the WordPress login form by using the filter login_message. This is a great trick if you’re working on a client’s project or have a multi author blog. You can add a welcome message for your users or give them important information/instruction about the admin section or you can add anything that you want to display to your users.

If you need to display a custom message on WordPress login page, you can use the following snippet to add your message on the login page.

// display custom message on wordpress login page
function wcs_custom_login_message( $message ) {
    return "<p class='message'>Welcome! Please log in with demo account.</p>";
}
add_filter( 'login_message', 'wcs_custom_login_message' );

And if you want to display a custom message on the registration screen, use this snippet.

// display custom message on wordpress registration page
function wcs_custom_registration_message( $message ) {
    return "<p class='message'>Hello! Please register to access freebies section.</p>";
}
add_filter( 'register_message', 'wcs_custom_registration_message' );

Share the love

If you like this snippet, share it with others!

Leave a Reply

Your email address will not be published. Required fields are marked *