[wp-hackers] Removing wp_admin_css from login only

Lynne Pope lynne.pope at gmail.com
Thu Jan 15 12:00:56 GMT 2009

Thanks Jeremy, this did the trick perfectly. I now have an unhacked
wp-login.php ;)

I added the function to my custom user-functions.php (which gets included in
the theme's functions.php) along with changes to login_headerurl and
login_headertitle, and the addition of my own CSS file, and viola! 5 minutes
work for a custom login screen with all WP version identification removed.

I prefer to do this through the theme since I always style the login to
match the theme and could never see the need for going the plugin route for

Its nice not to be hacking the core though!


2009/1/16 Jeremy Visser <jeremy.visser at gmail.com>

> On Thu, 2009-01-15 at 16:22 +1300, Lynne Pope wrote:
> > I need to remove the wp_admin_css from the login screen only and am
> having a
> > heck of a time working out how to do this.
> >
> > I have a custom login using my own stylesheets through my themes
> functions.
> > I don't need the admin css to load into the headers.
> This ought to do the trick:
>        <?php
>        /*
>        Plugin Name: Kill Login CSS
>        */
>        function kill_login_css($tag) {
>                return '';
>        }
>        if (basename($_SERVER['PHP_SELF']) == 'wp-login.php')
>                add_action('style_loader_tag', 'kill_login_css');
>        ?>

More information about the wp-hackers mailing list