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.
Open the functions.php file from your activated theme’s folder and add the below code at the end of the file.
1 2 3 4 5 6 7 | function admin_default_page() { return '/your-page-url'; } add_filter('login_redirect', 'admin_default_page'); |
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.
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.
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.
Article Tags: How To Auto Redirect Users After Login In WordPress, How to redirect a specific user after log-in?, Redirect after Login on Wordpress, Redirect Homepage after Login, redirect to homepage after login, Redirect user to original url after login?, WordPress User Login Redirect, WordPress: Redirect Non Admin After Login