Joy
(@joyously)
No, there is a filter for the message.
function my_login_messge( $message ) {
//change the $message
return $message;
}
add_filter( 'login_message', 'my_login_messge', 10, 1 );
If this is just for your site, you can put your message straight in there. But if it’s for a plugin, consider that the message is already translated, and the classes that are on there are probably needed for styling and perhaps for javascript. If you change it much, other plugins that style the login or enhance it in other ways might not work correctly.
Hello Joy,
thank you for your suggestion. Your function will replace the message. However, I would like to remove the box around the message “Enter the new password below” – refer to screenshot -`https://ibb.co/sQLLm4r
this class <p class=”message reset-pass”> create the box. I can either change <p class=”message reset-pass”> to <p>, which will remove the box or I have to modify the css, which I have no idea where the message reset-pass css reside.
thanks.
Altering CSS makes much more sense than trying to change unfiltered HTML. It doesn’t matter where the current CSS is because the strategy is to override the current CSS with the same selector, but parsed later by the browser. See the Codex for how to do this.
FWIW, you can locate where any CSS rule is for any element on a page by using your browser’s developer tools. These tools are indispensable for altering any CSS. I urge you to learn to use them, especially the CSS or element inspector.
Joy
(@joyously)
To modify the CSS, you will need to either add_action to the head section or add_action to the enqueue. The standard front end CSS is not loaded on this page, so you would have to go to a little more work to override it.
You might find it easier to use a plugin that helps you customize your login page, rather than this piecemeal approach.
thanks for your great info. I will look into this.