To change the default WordPress logo on the login page, make your logo fit in a 365px x 65px transparent png and then upload the image preferably into your theme images folder. In your theme functions.php file, add the following code below.
////////// Begin change site login logo function my_login_logo() { ?> <style type="text/css"> #login h1 a, .login h1 a { background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/site-login-logo.png); height:65px; width:320px; background-size: 320px 65px; background-repeat: no-repeat; padding-bottom: 30px; } </style> <?php } add_action( 'login_enqueue_scripts', 'my_login_logo' ); // Change site login logo link function my_login_logo_url() { return home_url(); } add_filter( 'login_headerurl', 'my_login_logo_url' ); function my_login_logo_url_title() { return 'Your Site Title'; } add_filter( 'login_headertitle', 'my_login_logo_url_title' ); ////////// End change site login logo |
Recent Comments