Skip to content

Instantly share code, notes, and snippets.

@johnmccole
Last active September 13, 2023 12:05
Show Gist options
  • Save johnmccole/09e3ae66dd6b993000b305a64de10e99 to your computer and use it in GitHub Desktop.
Save johnmccole/09e3ae66dd6b993000b305a64de10e99 to your computer and use it in GitHub Desktop.
Add the below snippet to functions.php to add the lost password url back into the login form when using wp_login_form(); Wrap the output text in html, it will be a text node without.
// Add lost password link to login form
add_action( 'login_form_middle', 'add_lost_password_link' );
function add_lost_password_link() {
return '<p class="forgot-password">Forgot Password? <a href="/wp-login.php?action=lostpassword">Click Here</a></p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment