WordPress.org

Ready to get started?Download WordPress

Forums

3.3 getting inside the admin login HEAD (6 posts)

  1. Jaja..
    Member
    Posted 2 years ago #

    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.

  2. Mindshare Studios, Inc.
    Member
    Posted 2 years ago #

    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?

  3. atreidex
    Member
    Posted 2 years ago #

    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!

  4. Mindshare Studios, Inc.
    Member
    Posted 2 years ago #

    Sure! This is working for me:

    add_action("login_head","mindshare_login_head");
    function mindshare_login_head() {
    	echo "<style type='text/css'>.login h1 a { background: url('http://somecompany.com/media/login.png') no-repeat top center !important; }</style>";
    }
  5. kbiglione
    Member
    Posted 2 years ago #

    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.

  6. Jaja..
    Member
    Posted 2 years ago #

    Yep thanks to @kbiglione.

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

    Thanks guys.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.