Customize WordPress login logo without a plugin

Sometime wordpress developer need to change the wordpress logo in admin login screen while creating the site for the client. For that we can simply include the code below and deploy it without using any plugin. Simply copy and paste the code below in the function.php of your theme folder.

function my_custom_login_logo() {
    echo '<style type="text/css">
        h1 a { background-image:url('.get_bloginfo('template_directory').'/images/custom-login-logo.gif) !important; }
    </style>';
}

add_action('login_head', 'my_custom_login_logo');

The image that need to changed should be placed in the images folder of the theme.

Source: http://www.wprecipes.com/customize-wordpress-login-logo-without-a-plugin

Leave a Comment

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.