Forum Replies Created

Viewing 1 replies (of 1 total)
  • We can also use the filter wp_login_errors available in This file called theme-my-login-custom.php and it must reside in /wp-content/plugins.
    When theme-my-login-custom.php is present, it is always loaded when the plugin is loaded.

    Use the below code in file called theme-my-login-custom.php and it must reside in /wp-content/plugins.

    <?php
    
    add_filter( 'gettext', function( $translation, $text, $domain )
    {
        if ( 'default' !== $domain )
            return $translation;
    
        if ( '<strong>ERROR</strong>: The username or password you entered is incorrect. <a href="%2$s" title="Password Lost and Found">Lost your password</a>?' !== $text )
            return $translation;
    
        return '<strong>ERREUR</strong>: Votre Email ou votre Mot de passe est incorrect. <a href="%2$s" title="Mot de passe perdu">Mot de passe perdu</a>?';
    }, 10, 3 );
    ?>
    
Viewing 1 replies (of 1 total)