How to Redirect Users after Successful Login in WordPress

Prem Tiwari - - WordPress Beginners, WordPress Snippets


If you want to redirect the user to specific pages after the successful login in your WordPress site, then keep your close attention in this tutorial as I am going to share how to redirect users after successful login in WordPress.

How to Redirect Users to Successful Login in WordPress

Open the functions.php file from your activated theme’s folder and add the below code at the end of the file.

If you want to redirect users on the based on the user role, then you need ot install the Peter’s Login Redirect WordPress plugin in your WordPress site.

If you have just started with WordPress, then check out:

After installation of this plugin, navigate to the Settings =>Login/logout Redirects page to setup the plugin configurations.

Now go to the Specific roles section to setup the user role based redirections.

loginredirect-userrole

Conclusion

I hope this tutorial helps you, if you have any questions regarding WordPress, then feel free to put your comments in below comment section. Do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials.


About: Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.


Tags: , , , , , , ,