How to add custom text to WordPress login page

Nothing complicated, paste the code below in your functions.php file. Message can be customized on line 3.

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' );

Thanks to WP Snippy for the tip!

Leave a Reply

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