Last active
August 17, 2019 11:16
-
-
Save himanshuahuja96/3eae02060ad99bc7bf29257424f12fd2 to your computer and use it in GitHub Desktop.
Theme my login custom error message filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myfunctiontoaddmailme($errors){ | |
$withoutLostPassword = ''; | |
if( $errors === '<strong>ERROR</strong>: Invalid username. <a href="https://nicolethemathlady.com/my-account/lost-password/">Lost your password?</a>' ){ | |
$withoutLostPassword = '<strong>ERROR</strong>: Not Sure about the Username?, Then <a href="mailto:nicole@nicolethemathlady.com?subject=Account Issue">Mail Me!</a> '; | |
$errors = $withoutLostPassword; | |
} | |
else if( $errors === '<strong>ERROR</strong>: Invalid email address. <a href="https://nicolethemathlady.com/my-account/lost-password/">Lost your password?</a>' ){ | |
$withoutLostPassword = '<strong>ERROR</strong>: Not Sure about the Email?, Then <a href="mailto:nicole@nicolethemathlady.com?subject=Account Issue">Mail Me!</a> '; | |
$errors = $withoutLostPassword; | |
} | |
return $errors; | |
} | |
add_filter( 'login_errors', 'myfunctiontoaddmailme',10,1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment