How to Change the Login Logo URL And Logo Image in WordPress

How to Change the Login Logo URL And Logo Image in WordPress

In this article we will show you how to change url of logo and logo image in admin form login in wordpress.
By default the login logo url link to WordPress.org and logo image default of wordpress. You can custom link and logo image by copy and paste the codes below in your theme’s functions.php file

// change url
function my_login_logo_url() {
    return home_url();
}
add_filter( 'login_headerurl', 'my_login_logo_url' );

//change logo image
function hiwptut_login_logo() {
	//$logo = get_option('woo_logo');
	$logo = 'URL_IMAGE_HERE';
 ?>
    <style type="text/css">
        .login #login h1 a {
            background-image: url( <?php echo $logo; ?> );
            width: 175px;
            height: 117px;
            background-size: 100% auto;
        }
    </style>
<?php }
add_action( 'login_enqueue_scripts', 'hiwptut_login_logo' );

Comments

comments

Share