1

A small but annoying problem is that in my WordPress (Elementor) login/register form wp-login.php?action=register the "Registration confirmation will be emailed to you" text is grey on black.

I used right click and Inspect and it's called reg_passmail (I think). It changes successfully if you change it in Styles pane but adding this custom CSS isn't working... any ideas why?!?

enter image description here

/* This isn't working for some reason */
#reg_passmail {
    color: white !important;
}
3
  • Where do you add the custom CSS?
    – sotirov
    Sep 22, 2023 at 13:37
  • In WordPress Menu ---> Appearance ---> Customise ---> Additional CSS
    – OrrDee
    Sep 22, 2023 at 19:17
  • The code in Additional CSS is not working for the admin pages.
    – sotirov
    Sep 22, 2023 at 19:43

1 Answer 1

0

You can use the register_form hook. Add this to your functions.php:

<?php
add_action( 'register_form', 'custom_css_register_form' );
function custom_css_register_form() {
    ?>
        <style>
            #reg_passmail {
                color: white !important;
            }
        </style>
    <?php
}
?>
3
  • Thanks I'll try it
    – OrrDee
    Sep 22, 2023 at 19:18
  • If it works, you can mark this as accepted answer, so it can be useful for someone else reading this question in the future.
    – sotirov
    Sep 23, 2023 at 0:24
  • 1
    OK thanks will do
    – OrrDee
    Sep 23, 2023 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.