Skip to content

How To Add Custom Text To WordPress Login Page

In this tutorial, I’ll show you how to add a custom text to WordPress login page with a simple snippet. This is a great trick if you’re working on a client’s project. It will give them in slight info about your website, login page or anything you want to write to it.

Add following code to your functions.php file:

function wps_login_message( $message ) {
    if ( empty($message) ){
        return "<p class='message'>Welcome to this site. Please log in to continue</p>";
    } else {
        return $message;
add_filter( 'login_message', 'wps_login_message' );

Message can be customized on line 3.

Leave a Reply

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