TransWikia.com

Cannot changing login button color, have tried theme, plugins... is it GoDaddy managed?

WordPress Development Asked by user2680925 on January 6, 2021

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?

One Answer

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.

Correct answer by Rup on January 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP