[Support request] Styling the wordpress login

Home Forums Support Styling the wordpress login

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1414718
    Carole

    Hello,

    I am trying to follow some instructions given to me to style the WordPress login but it does not work:

    1. I added this in the functions.php child theme –
    function my_custom_login() {
    echo ‘<link rel=”stylesheet” type=”text/css” href=”‘ . get_bloginfo(‘stylesheet_directory’) . ‘/login/custom-login-styles.css” />’;
    }
    add_action(‘login_head’, ‘my_custom_login’);

    2. Created a LOGIN folder in the Generate Press Child theme folder

    3. Create a custom-login-styles-css sheet in the login folder

    Unfortunately, any CSS changes I make in the CSS files don’t change anything.

    What am I doing wrong?
    Carole

    #1414787
    David
    Staff
    Customer Support

    Hi there,

    try the login_enqueue_scripts hook instead of the login_head

    #1414798
    Carole

    Thank you!
    I tried the following CSS – body.login {
    background-color: #313b3d;
    }
    but no luck:(
    Carole

    #1414975
    Carole

    I followed the instructions by changing

    function my_custom_login() {
    echo ‘<link rel=”stylesheet” type=”text/css” href=”‘ . get_bloginfo(‘stylesheet_directory’) . ‘/login/custom-login-styles.css” />’;
    }
    add_action(‘login_head’, ‘my_custom_login’);

    to

    function my_custom_login() {
    echo ‘<link rel=”stylesheet” type=”text/css” href=”‘ . get_bloginfo(‘stylesheet_directory’) . ‘/login/custom-login-styles.css” />’;
    }
    add_action(‘login_enqueue_scripts’, ‘my_custom_login’);

    Is this correct?

    Thanks

    #1415196
    Tom
    Lead Developer
    Lead Developer
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.