Customize WordPress site backend logo and url


Add following functions into themes’s functions.php file.

/* This function will replace default logo with your site logo */
function yoursite_login_logo()
{
echo '<style type="text/css">
h1 a {
background-image:url('.get_bloginfo('template_directory'). '/images/site_logo.png) !important;
background-size:auto !important ;}
</style>';
}

add_action('login_head', 'yoursite_login_logo');

/* This function will replace default url with your site url */
function yoursite_logo_url( $url ) {
return get_bloginfo( 'url' );
}
add_filter( 'login_headerurl', 'yoursite_logo_url' );
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s