First, you need to create an accessible URL. The easiest way to do this is to create a page. On that page, you can insert your form using a shortcode, for example.
Alternatively, you can also create your own pseudo-URL using a rewrite rule. You can do this with: https://developer.wordpress.org/reference/functions/add_rewrite_rule/ – this article describes a fairly comprehensive list of the options available: https://brightminded.com/blog/mastering-wordpress-rewrite-rules/
Maybe you don’t understood what I mean…
I did a form where user can put his email address and receive a confirmation reset password email with link.
When user clicking on confirmation link : http://site.com/wp-login.php?action=rp&key=ADkmFfsaksASDkdda&login=wildapache
After, appear a form witch pre-compiled new password and confirmation button.
Now I need to create on front end page, like a page template, BUT, I don’t understand what I need to do and how it logic work.
Just rewrie wp-login.php?action=rp&key=… to >> http://www.site.com/reset-form?rp=…&key=…
reset-form – is a template with a reset password form
-
This reply was modified 2 weeks, 3 days ago by
wildapache.
I’ve described above how to set up a custom URL in the frontend. To make /reset-form accessible, you’ll need to follow the steps outlined there.
To link to this URL, I wouldn’t recommend redirecting to the default WordPress URL; instead, use a custom URL in the email. How you do this depends on how you generate the email. If it’s not your own email but the one generated by WordPress, you can either customize its text or create a completely new email of your own.
I wouldn’t recommend redirecting to the default WordPress URL; instead, use a custom URL in the email.
It’s not good for what I am doing, because I will to restrict any access to admin/login default wordpress pages for auth/no-auth users
I found a solution.
It’s work like with activation account but a little bit in another way in the end of reset password function.
I have another question related to the password reset.
Why after reset password I don’t receive any password reset confirmation email ?
Where I can see where is the problem ?
Solved.
It’s because of this:
From codex :
This function is normally called when a user resets a lost password, not if the password is changed on their profile page.