How can I trigger a message box to appear on the login form?
I’l trying to get the little yellow notice bar to appear above the login form conditionally.
The below code only print the content on the page (duh, I know).
add_action('login_head', 'login_form_message');
function login_form_message() {
echo 'Custom Login Form Message';
}
There’s a filter to add messages there. You can sneak in messages that will than handled like an error message (without being one).
Here’s an example of this filter: