How To Auto Redirect Users After Login In WordPress

I have already posted an article about auto redirecting users after they logout out of your WordPress website. In this post, I’ll show you how to redirect users after login in WordPress with a cool trick. We will redirect users to home page and admins to admin panel of your site.

Tom McFarlin coded a great snippet to redirect all the users of your WordPress website to the home page of your site following a successful login attempt & the admins will be redirected to the admin panel of the website.

Just add following snippet to your current theme’s functions.php file:

You can also redirect the user to a specific page of your site with this snippet: