title: How can I change login error messages on WordPress?
body: <p>I'd like to change displayed text when there's an error while someone is trying to login on my website. I found where are the current displayed messages that I'd like to change. They are on the user.php file (<code>wp-includes/user.php</code>).</p>
  
  <p>Specifically:</p>
  
  <pre><code>function wp_authenticate_email_password( $user, $email, $password ) {
  if ( $user instanceof WP_User ) {
      return $user;
  }
  
  if ( empty( $email ) || empty( $password ) ) {
      if ( is_wp_error( $user ) ) {
          return $user;
      }
  
      $error = new WP_Error();
  
      if ( empty( $email ) ) {
          $error-&gt;add( 'empty_username', __( '&lt;strong&gt;ERROR&lt;/strong&gt;: The email field is empty.' ) ); // Uses 'empty_username' for back-compat with wp_signon()
      }
  
      if ( empty( $password ) ) {
          $error-&gt;add( 'empty_password', __( '&lt;strong&gt;ERROR&lt;/strong&gt;: The password field is empty.' ) );
      }
  
      return $error;
  }
  
  if ( ! is_email( $email ) ) {
      return $user;
  }
  
  $user = get_user_by( 'email', $email );
  
  if ( ! $user ) {
      return new WP_Error( 'invalid_email',
          __( '&lt;strong&gt;ERROR&lt;/strong&gt;: Invalid email address.' ) .
          ' &lt;a href="' . wp_lostpassword_url() . '"&gt;' .
          __( 'Lost your password?' ) .
          '&lt;/a&gt;'
      );
  }
  </code></pre>
  
  <p>And</p>
  
  <pre><code>if ( is_wp_error( $user ) ) {
          return $user;
      }
  
      if ( ! wp_check_password( $password, $user-&gt;user_pass, $user-&gt;ID ) ) {
          return new WP_Error( 'incorrect_password',
              sprintf(
                  /* translators: %s: email address */
                  __( '&lt;strong&gt;ERROR&lt;/strong&gt;: The password you entered for the email address %s is incorrect.' ),
                  '&lt;strong&gt;' . $email . '&lt;/strong&gt;'
              ) .
              ' &lt;a href="' . wp_lostpassword_url() . '"&gt;' .
              __( 'Lost your password?' ) .
              '&lt;/a&gt;'
          );
      }
  
      return $user;
  }
  </code></pre>
  
  <p>I think I should use <code>add_filter</code>on my <code>functions.php</code>file in my child theme but I`m not familiar with it. Can anyone help me?</p>