admin管理员组

文章数量:1317915

I have added this code into my theme Customization and also Simple Custom CSS plugin

.wp-core-ui #login .button-primary {
  background: #7e0001 !important; 
  background-image: none !important;
  border-color: #7e0001; 
}

For the life of me I cannot that code override the 'default blue' of the WordPress login button. The only plugin that works is "Login Press" which seems to use the exact same CSS as me, but somehow WordPress pays attention to it and not my theme CSS. I don't need to style the whole thing I just want to colorize the damn button.

Is it me? Is it GoDaddy WordPress Managed hosting?

I have added this code into my theme Customization and also Simple Custom CSS plugin

.wp-core-ui #login .button-primary {
  background: #7e0001 !important; 
  background-image: none !important;
  border-color: #7e0001; 
}

For the life of me I cannot that code override the 'default blue' of the WordPress login button. The only plugin that works is "Login Press" which seems to use the exact same CSS as me, but somehow WordPress pays attention to it and not my theme CSS. I don't need to style the whole thing I just want to colorize the damn button.

Is it me? Is it GoDaddy WordPress Managed hosting?

Share Improve this question asked Oct 31, 2020 at 6:41 user2680925user2680925 1032 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 1

The login page doesn't load your theme's stylesheet.

If you want to include extra CSS on your login page then you should hook login_enqueue_scripts and write out an extra <style> tag there, or include another CSS file (or even your theme's full CSS file if you want to).

You could also use login_head, and there's an example of including another CSS file in the login_head documentation, but it sounds like login_enqueue_scripts is more correct.

本文标签: Cannot changing login button colorhave tried themeplugins is it GoDaddy managed