Having background-size: auto auto !important;
in the output can resolve this. I have this in my other plugin http://wordpress.org/plugins/custom-login-logo/.
I would suggest sharing the link of your login page, so we can check if there is any other plugin adding the code. So far when I check this plugins code, it also adds proper background size automatically and overrides default WP css.
thanks harish!
I changed to width: auto; in line 177 of uber-login-logo.php
and it works!
public static function replaceLoginLogo()
{
$img_data = get_option('uber_login_logo');
// use https for background-image if on ssl
if (is_ssl()) {
$img_data['src'] = preg_replace( "/^http:/i", "https:", $img_data['src'] );
}
if ($img_data) {
$style = '<style type="text/css">';
$style .= sprintf('.login h1 a { background: transparent url("%s") no-repeat center top; width: auto !important; background-size:%spx %spx; height: %spx;}', $img_data['src'], $img_data['width'], $img_data['height'], $img_data['height']);
$style .= '</style>';
$style .= "\r\n" . '<!-- Uber Login Logo ' . self::VERSION . ' ' . self::UBERURL . ' -->' . "\r\n";
echo $style;
}
}
I was going to say it broke but the code above fixed it 🙂
Would rather this not have to be implemented for 40+ sites!
Is this in the works as an update to the plugin itself?
@3cstudio, you an try to find the developers contact details and let them know. I am sure they would fix it asap. I had the similar issue in my plugin which I just updated. You can try it in the meanwhile http://wordpress.org/plugins/custom-login-logo/
Shouldn’t be a huge fix. Will get something out today.
Thanks Alex! Worked like a charm… and if anyone has many sites, I recommend you use something like WP Remote to update All, if you don’t have a process already in place. 🙂
Thanks again,
Steve C.
3Cstudio
Alternatively, and without a plugin, you could add this to your functions.php:
/******* Customize Login Logo ******/
function my_custom_login_logo() {
echo '<style type="text/css">
#login h1 a { background-image:url('.get_bloginfo('stylesheet_directory').'/images/login_logo.png) !important; background-size: 320px 123px !important; height: 123px !important; width: 320px !important; }
</style>';
}
add_action('login_head', 'my_custom_login_logo');
Chris.
@csbecker the plugin uses similar code, but best practise is to use a plugin for such things, or else when changing theme the customizations are lost.