Redirect Successful Registraion

How to Redirect Successful Registration to Thank You Page in WordPress

By default WordPress redirects a successful registration to example.com/wp-login.php?checkemail=registered where it shows “Registration complete. Please check your email, then visit the login page”. But you can redirect them to your custom thank you page like example.com/thanks.

There you can say them to check the spam folder for your email alongside thanking them.

Create a page and in your theme’s functions.php file, paste following code:

function weusewp_reg(){return home_url('/thanks');}
add_filter('registration_redirect', 'weusewp_reg');

Change ‘/thanks‘ according to your page slug.

You can create a custom page template to use for that page.

Spread the love

A teacher by profession, a traveler by passion and a netizen by choice.

Morshed Alam

You use WordPress! Why don't we share our experiences. It may be a tutorial, tips, tricks, tweaks or about security, performance or WordPress news. Write Today

Leave a Comment

Your email address will not be published. Required fields are marked *