• Resolved gfdesign

    (@gfdesign)


    Dear support
    I want to change the background color of my login page with this code, but it does not work. Not even I see the code is loading.

    add_action( 'wp_head', function () { ?>
    <style>
    
    /* CSS code goes here */
      	body.login {
      		background-color: #3E99D4 !important;
    	}
      
    </style>
    <?php } );

    Could you tell me what I am doing wrong?
    Thanks

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    In order to add styles on the login page, you will need to use the the login_head hook instead of wp_head:

    add_action( 'login_head', function () { ?>
    <style>
    
     	/* CSS code goes here */
      	body.login {
      		background-color: #3E99D4 !important;
    	}
      
    </style>
    <?php } );
    Thread Starter gfdesign

    (@gfdesign)

    Thanks for replying Shea!
    Best regards from Argentina

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CSS only for login page’ is closed to new replies.