• Hello! I admin a site with online store for my client. I see they have a few login attemps by some users that either forget their login details or simply do not exist. I am not refering to bots and random logins from outside. Those are automatically blocked by the firewall plugin.

    I know these clients do exist, or when they don’t exist, they try to login with apparently genuine emails, they just haven’t registered yet. That is completely normal.

    Now, I wanted to customize the text that appears in the login page to warn people they have 5 login attempts before being locked out for 4 hours.

    And another message when they are effectively locked out, to contact the store owner so they can unlock the user and eventually help them with the login process.

    Currently I have WordFence firewall and Theme My Login to customize the login page, but it only changes the appearance of the login page. I can’t edit it to add any text.

    Is there a way to edit the pre-login page and post-login page (if a lock occurs) ? I just to add text as a message, no images are needed.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello!

    To customize the login messages on your WordPress site, especially for situations like failed login attempts and account lockouts, you can use a combination of custom code and the plugins you’re already using. Since you have WordFence for security and Theme My Login for customizing the login page, you’re halfway there.

    Here’s a step-by-step guide:

    1. Custom Code for Pre-Login Message:
      • You can add a custom function to your theme’s functions.php file. This function will display a message on the login page about the login attempt limit.
      • Here’s a basic example of what the code could look like:

    function custom_login_message() {

    $message = "Attention: You have 5 login attempts before being locked out for 4 hours.";

    return $message;

    }

    add_filter('login_message', 'custom_login_message');

    • This code will add a message above the login form.

    This approach should allow you to add custom messages both before and after the login attempt, enhancing the user experience and providing clear instructions to your clients.

    Customizing Post-Lockout Message:

    • For the message that appears after a user is locked out, WordFence might not have a straightforward option to customize this message directly through the WordPress dashboard.
    • However, you can use a translation file to modify the text. This involves creating a custom translation where the original message is replaced with your custom text. Tools like Loco Translate can help with this, but it requires some familiarity with .po and .mo files.

    Theme My Login:

    • Since you’re already using Theme My Login, you can utilize its templating features to further customize the login page. If you need to add additional messages or instructions specific to your site, you can do so by editing the templates.
    • The plugin’s documentation and support forum can guide you through the process of editing templates to include custom messages.
    Thread Starter msdesignfoto

    (@msdesignfoto)

    Thank you for the fas reply! I will try that!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Message when user is locked out’ is closed to new replies.