0

I'm doing a custom form where the user can change is password. After submission and if the password is according to the rules I save the new one, overriding the old one, to the database, delete the cache and do the logout and signon of the user. Right now after that it's redirecting do the homepage, but what I want to do after is to redirect the user to a specific page, where I show a message, instead of going to the homepage. Can anyone help me with this?

Thank you!

1
  • Do you have any piece of code to show?
    – Domain
    Commented Sep 17, 2014 at 17:14

1 Answer 1

0

As you said you have a custom form, I am assuming you are not going to use WordPress default 'reset password' functionality.

You can use wp_redirect or wp_safe_redirect to redirect to a specific page after a particular condition (e.g. if the password is changed successfully)

1
  • Thank you! I was making some mistake and that was why it wasn't working correctly, and with your help I found the mistake. And yes you'te assuming correctly, I'm not using the 'reset password' funcionality
    – Rui Silva
    Commented Sep 17, 2014 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.