Change Error Message on the Login Screen
functions.php
file. Please ensure you have a backup of your website before making this change. If you're not comfortable editing the functions.php file of your website, you can use a free plugin like Code Snippets to help.When a client tries to log into a portal that they haven't been assigned to, an error message will display and they will be prevented from logging in.
If you would like to change what the error message says, follow these steps:
First navigate to Appearance, Theme File Editor and find the functions.php
link under Theme Files on the right hand side.
Then, paste the following snippet at the bottom of your functions.php file:
add_filter( 'leco_cp_login_error_message', 'my_leco_cp_login_error_message' ); function my_leco_cp_login_error_message() { return 'Hello there - You are not supposed to be here I guess?'; }
The above snippet will change the error message text to to "Hello there - You are not supposed to be here I guess?".
Simply change "Hello there - You are not supposed to be here I guess?" to anything you want, and you are good to go!