Support » Fixing WordPress » 3.3 getting inside the admin login HEAD

  • Hello, I’m very happy with the new WP 3.3, it’s lovely.

    Thanks to the people who help building it.

    Only one little bug i’ve got.
    I’ve been changing the login screen for a few years now doing this inside the functions.php to include some code inside the <head> of the login page.

    function add_viewport_login() {
    echo '<meta name="viewport" content="initial-scale=1.0; maximum-scale=1.0; width=device-width;" />';
    add_action('login_head', 'add_viewport_login');
    function custom_login() {
    echo '<link rel="stylesheet" type="text/css" href="'.get_bloginfo('template_directory').'/css/custom-login.css" />';
    add_action('login_head', 'custom_login');

    And by (over) writing the default WP styles I can change the inlog layout to my own theme style.
    Only this doesn’t work anymore how can i get this done at the moment?

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Actually I just found an error in MY code. Doh! This is working for me no problem now in 3.3… BJ maybe you should double check your code?

    Same problem here.
    The custom login page won’t work in WordPress 3.3 anymore.

    @mindshare: can you please paste the code you’re using here? Thank you!

    Sure! This is working for me:

    function mindshare_login_head() {
    	echo "<style type='text/css'>.login h1 a { background: url('') no-repeat top center !important; }</style>";

    My custom login styles were busted by the 3.3 update too. Some classes have changed/been added.

    These are the changes I made to my CSS:

    Background color was previously set on the html selector, now it’s set with body.login

    Custom logo was previously set on h1 a, now it’s set on .login h1 a.

    Yep thanks to @kbiglione.

    WP has changed the some classes and ID’s inside the HTML of the login page.

    Thanks guys.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘3.3 getting inside the admin login HEAD’ is closed to new replies.