Title: Lost-Password link wrong inside error message
Last modified: September 19, 2023

---

# Lost-Password link wrong inside error message

 *  [Matthias Baier](https://wordpress.org/support/users/ma_wordpressorg/)
 * (@ma_wordpressorg)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/lost-password-link-wrong-inside-error-message/)
 * I’m having trouble with the password-reset function here. 
   Basically what I would
   like to do is send my members to wordpress’ classic login-page with it’s own “
   forgot-password”-page. I had problems users generating their new password because
   the plugin ithemes security enforces strong passwords and wordpress has a builtin
   password-tool that rates user’s passwords with a nice bar. I was able to change
   the forgot-password-link with this filter:
 *     ```wp-block-code
       add_filter( 'wpmem_forgot_link', 'my_forgot_link', 10, 2 );
       function my_forgot_link( $link, $tag ) {
           // Using home_url() instead makes your filter portable.
           return home_url() . '/wp-login.php?itsec-hb-token=mysupersecretlogin:-&action=lostpassword';
       }
       ```
   
 * However this filter doesn’t work, if you have typed in a valid e-mail and a wrong
   password. Then a error message appears:
 * > **Error:** The password you entered for the email address **[no@mail.com](https://wordpress.org/support/topic/lost-password-link-wrong-inside-error-message/no@mail.com?output_format=md)**
   > is incorrect. [Lost your password?](http://192.168.2.123/Kunden/daom/benutzerkontoverwaltung/?a=pwdreset)
 * The lost-password-link there is still the old wp-members-lost-password-link (
   that you can set by selecting a User Profile Page), not the filtered one.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/lost-password-link-wrong-inside-error-message/#post-17062856)
 * The URL/link in the error message is actually generated by a different WP function
   and filter. You can change it by using `[lostpassword_url](https://developer.wordpress.org/reference/hooks/lostpassword_url/)`
    -  This reply was modified 2 years, 8 months ago by [Chad Butler](https://wordpress.org/support/users/cbutlerjr/).
      Reason: forgot link
 *  Thread Starter [Matthias Baier](https://wordpress.org/support/users/ma_wordpressorg/)
 * (@ma_wordpressorg)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/lost-password-link-wrong-inside-error-message/#post-17062910)
 * Yes, I tried that filter too and it also works. But not if I set a User Profile
   Page. Then the error message contains wpmems link and not the ones defined by
   wpmem_forgot_link or lostpassword_url.
 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/lost-password-link-wrong-inside-error-message/#post-17063522)
 * Check your cache – either plugin or server-side. Those are the only two filters,
   and the error message link is specifically lostpassword_url, no matter where 
   you are.
 *  Thread Starter [Matthias Baier](https://wordpress.org/support/users/ma_wordpressorg/)
 * (@ma_wordpressorg)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/lost-password-link-wrong-inside-error-message/#post-17063665)
 * Hm… ok. I’ll try that tomorrow. 
   I tested it in a local environment and on a 
   server. Both filters work untill I set a User Profile Page. Then I end up with
   two forget links. The first one within the error notice-box, which is then set
   to the wp-member-link is the wrong one.
 * The second one is below the login-fields and is correct with the wpmem_forgot_link
   from the filter.
 * I can switch back an forth setting a User Profile Page and the links change accordingly.
    -  This reply was modified 2 years, 8 months ago by [Matthias Baier](https://wordpress.org/support/users/ma_wordpressorg/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Lost-Password link wrong inside error message’ is closed to new replies.

 * ![](https://ps.w.org/wp-members/assets/icon-256x256.png?rev=1226414)
 * [WP-Members Membership Plugin](https://wordpress.org/plugins/wp-members/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-members/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-members/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-members/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-members/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-members/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Matthias Baier](https://wordpress.org/support/users/ma_wordpressorg/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/lost-password-link-wrong-inside-error-message/#post-17063665)
 * Status: not resolved