Embed Snippet on Your Site
MemberPress: Customize Default WordPress Password Reset Request Email Body
This code snippet customizes the body of the password reset request email sent to users from "yourdomain.com/wp-login.php?action=lostpassword".
The code replaces the default message with a custom one. The sample below will add the personalized “Hi [username], you recently requested a password reset for your account.” custom text. The rest of the email template remains unchanged.
To change the message, replace or modify the “Hi ' . $user_login . ', you recently requested a password reset for your account.” text with the new text on this lines:
$message = __( 'Hi ' . $user_login . ', you recently requested a password reset for your account.', 'text_domain' ) . "n";
To include additional messages in the email, you can copy the rows mentioned above and paste it below. For example,
$message = __( 'Hi ' . $user_login . ', you recently requested a password reset for your account.', 'text_domain' ) . "n";
$message .= __( 'Please click the link below to reset your password:', 'text_domain' ) . "n";
$message .= __( 'Your password reset link', 'text_domain' ) . "n";
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Comments