Forums

Customizing Login Page - Removing old css (2 posts)

  1. bgrun80
    Member
    Posted 1 year ago #

    Hey,

    I am using the technique from
    http://www.problogdesign.com/wordpress/custom-wordpress-login-screen/ to customize my login page. (code below)

    While effective, it is really annoying that the old CSS file is not overwritten, so that the old CSS rules apply unless I explicitly do something else on top of them.

    Firstly, am I doing something wrong?

    Secondly, is there something I can add into my function that would allow the other CSS file to be overwritten or deleted? (I don't want to do it manually because of doing it every time I upgrade...)

    Cheers,

    Ben

    //Custom Login Code
    function custom_login() {
    echo '<link rel="stylesheet" type="text/css" href="'.get_bloginfo('template_directory').'/custom-login/custom-login.css" />';
    }

    add_action('login_head', 'custom_login');

  2. t-p
    Member
    Posted 1 year ago #

    (I don't want to do it manually because of doing it every time I upgrade...)

    For that reason, perhaps you want to consider creating a child theme.

Topic Closed

This topic has been closed to new replies.

About this Topic