How To Use High Contrast Login Screen In WordPress?

Today one of our reader emailed us asking how he can use a high contrast color style in his website’s login page. Black Login Screen plugin automatically changes WordPress login screen to black color and makes it more contrast. It provides you a simple WordPress hack which you can manually edit (or use inside your theme’s function.php file) to activate a custom background color on your website’s login page.

Install and activate Black Login Screen plugin. After activation it changes your login screen background to black and makes it more contrast.

How To Use High Contrast Login Screen In WordPress?

Now for using a custom background color login to your WordPress site and navigate to Dashboard -> Plugins -> Editor page, select  ‘Black Login Screen’ plugin from the drop down. Open black-login-screen.php file and replace #000000 color code with your own custom color code.

function black_login_screen_load_textdomain()
    {
        load_plugin_textdomain( ‘black_login_screen’, false, dirname( plugin_basename( __FILE__ ) ) . ‘/langs/’ );
    }
    
    add_action( ‘plugins_loaded’, ‘black_login_screen_load_textdomain’ );

    function black_login_screen_login_head()
    {
        echo ‘<style>
            
                html
                {
                    background: #000000;
                }
                
                body
                {
                    background: #000000;
                }
            
            </style>’;
    }
    
    add_action( ‘login_head’, ‘black_login_screen_login_head’ );

Using a custom login screen background color in addition to Hide Login Logo plugin gives a more beautiful layout to your website’s login page.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.