Viewing 3 replies - 1 through 3 (of 3 total)
  • Thanks for reporting this. I’m experiencing the same issue on multiple WordPress sites since updating to 4.5 as well.

    I was able to fix the issue by adding !important, but that doesn’t seem like an excellent long term solution.

    function my_login_logo()
    {
        ?><style type="text/css">
            .login h1 a {
                background-image: url("<?php echo get_stylesheet_directory_uri(); ?>/images/site-login-logo.png") !important;
                background-repeat: no-repeat !important;
                background-size: 180px 120px !important;
                height: 120px !important;
                padding-bottom: 60px !important;
                width: 180px !important;
            }
        </style><?php
    }
    add_action('login_enqueue_scripts', 'my_login_logo');
    

    I have solved this issue by just changing the CSS selector from

    .login h1 a

    to

    #login h1 a

    Thread Starter Mizunga

    (@mizunga)

    The problem is the login_enqueue_scripts hook itself. Better use login_head() and it will be solved.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Since version 4.5 login_enqueue_scripts Doesn't ovewrite the default styles’ is closed to new replies.