Skip to content

Instantly share code, notes, and snippets.

Last active Nov 8, 2015
What would you like to do?
Add a custom text message to WordPress login page. Source:
.login-message {
color: #777;
font-size: 14px;
line-height: 1.625;
padding: 12px 24px 24px;
//* Add a custom text message to WordPress login page
function prefix_login_message($message) {
if (empty($message)) {
return "<p class=\"login-message\">Add your custom text message here!</p>";
else {
return $message;
add_filter('login_message', 'prefix_login_message');
//* Load "login-message.css" CSS file stored in active child theme directory
function prefix_login_stylesheet() {
wp_enqueue_style('custom-login', get_bloginfo('stylesheet_directory') . '/login-message.css');
add_action('login_enqueue_scripts', 'prefix_login_stylesheet');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment