• Resolved jkdev

    (@jkdev)


    Hello,

    Is there a way I’m not seeing to change the error message you get when a user gets locked out? Or even direct them to another page upon lockout?

    Here is the message I’m talking about: “ERROR: Access from your IP address has been blocked for security reasons. Please contact the administrator.”

    Thank you

    • This topic was modified 6 years, 3 months ago by jkdev.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor wpsolutions

    (@wpsolutions)

    Hi,
    Yes that message is wrapped in following filter hook:

    $error_msg = apply_filters( 'aiowps_ip_blocked_error_msg', __('<strong>ERROR</strong>: Access from your IP address has been blocked for security reasons. Please contact the administrator.', 'all-in-one-wp-security-and-firewall') );

    You can change it by hooking into the above filter.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi,

    Add the following function to your theme functions.php file. It is always best to use a child theme. Remember to replace ‘My custom error message!’ with your own message.

    add_filter('aiowps_ip_blocked_error_msg', 'my_custom_message');
    function my_custom_message($error_msg) { 
    return 'My custom error message!'; 
    }

    Let us know if you need more help.

    Kind regards

    Thread Starter jkdev

    (@jkdev)

    Worked perfectly, thank you!

    Plugin Contributor mbrsolution

    (@mbrsolution)

    I am happy to hear ??

    Enjoy the plugin

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change Error Message’ is closed to new replies.