WordPress.org

Forums

[resolved] Login Image Squashed after Update (9 posts)

  1. whatachamp
    Member
    Posted 4 years ago #

    Hi,
    After updating to 3.4, I've noticed the login page logo (which I've customised to show as the client's logo), is now squashed.

    In order to show a custom logo, I have been using the following code in the functions.php file:

    // login page logo
    function custom_login_logo() {
    	echo '<style type="text/css">h1 a { background: url('.get_bloginfo('template_directory').'/images/cms_logo.png) 50% 50% no-repeat !important; }</style>';
    }
    add_action('login_head', 'custom_login_logo');

    Any ideas on why the logo is now squashed and how I can fix it so it appears normally?
    Thanks

  2. per4mance
    Member
    Posted 4 years ago #

    Hi,
    same to me. Who can solve the issue? The click on the logo does not load the index page in combination with Buddypress.

    In Firefox browsers the logo seems to be ok like before the upgrade to WP 3.4 - the issue is with Chrome and Safari Browsers.

    The second issue I have is the URL on top left on login page.

  3. esmi
    Forum Moderator
    Posted 4 years ago #

    @per4mance: It is impolite and contrary to forum policy to interrupt another poster's ongoing thread with a question of your own. Please post your own topic.

  4. per4mance
    Member
    Posted 4 years ago #

    @esmi

    Sorry for this. It was not my intention to disturb your thread.

  5. whatachamp
    Member
    Posted 4 years ago #

    @esmi, for the most part, @per4mance 's reply was related to my original post.

    @per4mance, if you do find a solution please post it here and I'll do the same.
    Thanks

  6. per4mance
    Member
    Posted 4 years ago #

    @whatachamp

    I think it's a theme issue. Take a look to two sites:

    1. http://www.123web.pro/wp-login.php
    This theme does not have an issues after update WP 3.3 to 3.4 (Theme uDesign)

    2. https://www.sportstep.de/wp-login.php
    This theme does not look right with login logo and URL on top left (Theme Buddyboss, WP + Buddypress) after update WP 3.3 to 3.4.

    The developer wrote to theme Buddyboss:
    I’m not sure why but these two lines (85-86) in wp-login.php are causing this issue:

    $login_header_url = apply_filters( ‘login_headerurl’, $login_header_url );
    $login_header_title = apply_filters( ‘login_headertitle’, $login_header_title );

    Thread can be followed here:
    http://www.buddyboss.com/groups/buddyboss-theme/forum/topic/login-error-after-updating-to-wp-3-4-and-bb-1-5-6/

  7. whatachamp
    Member
    Posted 4 years ago #

    Hi @per4mance

    Thanks for those links. Basically I think what's happening is 3.4 is resizing the login logos to width 310px, maybe as a result of the work they've done with custom headers, and this has had an effect on the login logo.

    I can't see where this is defined in order to fix it, so I will just make sure my login logos are sized at exactly 310px x 70px.

  8. whatachamp
    Member
    Posted 4 years ago #

    Ok so I've figured out the issue. In the wp-admin.css file (located in wp-admin > css) WP have added background-size to the login logo:
    background-size:274px 63px;

    To override this I just needed to add background-size: auto !important; to my original custom login logo code within functions.php. It will now be:

    // login page logo
    function custom_login_logo() {
    	echo '<style type="text/css">h1 a { background: url('.get_bloginfo('template_directory').'/images/cms_logo.png) 50% 50% no-repeat !important; background-size: auto !important; }</style>';
    }
    add_action('login_head', 'custom_login_logo');

    Voila, fixed!

  9. whatachamp
    Member
    Posted 4 years ago #

    Topic resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic