Back to blog

Add client logo to wordpress login

If you want to add your logo or the logo of your client above the wordpress login you have to…

If you want to add your logo or the logo of your client above the wordpress login you have to put a logo.png file in the images folder of your wordpress theme and use a script like this in your functions.php file:

How to add customize logo in WordPress login

function client_wordpress_logo() { ?>
    <style type="text/css">
        body.login div#login h1 a {
            background: transparent url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo.png) top center no-repeat;
			width:100%;
			
        }
    </style>
<?php }
add_action( 'login_enqueue_scripts', 'client_wordpress_logo' );

Canonical URL