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.