In this tutorial, I will be walking us through the process of creating a WordPress ajax password reset form so users can change their password at the frontend of your site and finally, how to add it as a widget to your website sidebar and make it your default lost-password/password-reset page.
Building the Ajax Password Reset Form
We have the steps in building a custom lost-password / password-reset form covered already. To enable ajax;
- Click the
SettingsProfilePress menu and scroll to the
- Ensure the
Disable Ajax Modecheckbox isn’t checked. If it is, uncheck it.
- It is that easy.
Making the Ajax Password Reset Form Your Lost-password Page
After enabling Ajax mode; to make your preferred password-reset form your WordPress website lost-password page:
- Copy the shortcode of the registration form and save it to a page.
- Still on
Global Settings, set the page above as the Password-reset Page.
Afterwards, every visit to
https://yoursite.com/wp-login.php?action=lostpassword will be redirected to the above page.
Adding Ajax Password Reset Form Widget to WordPress Sidebar
Navigate to Appearance >> Widgets, drag the ProfilePress Form widget to your website sidebar, select your chosen registration form from the dropdown and save.
Preview your WordPress site to see the password reset form displayed on the front-end of your site.