When someone logs into your WordPress through their social media accounts, do they all land on the same homepage?
What if you could send each user to a different page based on their role like customers to the dashboard or contributors to the editor?
That’s exactly what the Happy Social Login plugin helps you do. Let’s see how this feature works and how to set it up easily.
Why Redirect Users Based on Their Role? #
Not every user has the same purpose on your site. Sending everyone to the same page after login might confuse them or waste their time.
Here are a few common situations:
- You run an online store: Customers should land directly on their account or home page.
- You manage a blog with multiple authors: Contributors should go to the post editor or dashboard.
- You’re building a member site: Subscribers should go to a welcome or profile page.
By redirecting users based on their role, you improve their experience and guide them to exactly where they need to be.
How It Works with Happy Social Login #
When a user logs in through a social account for the first time, WordPress creates a new account for them. Using the Happy Social Login plugin, you can not only assign a default role (like Subscriber or Customer), but also set a custom redirection page based on that role. This means every role can have its own unique landing page right after login.
How to Set Redirects for Each Role after Google or Facebook login? #
Step 1: Log in to your WordPress Dashboard.
Step 2: Go to Settings > Happy Social Login.
Step 3: Click on the General Settings tab.
Step 4: Go to the Redirection Settings.
Step 5: Enable Role-Based Redirection
- Redirect after login
- Redirect after logout
Step 6: Enter URLs for Each Role
You can now assign custom pages for each user role after login and logout. See an example below:-
Subscriber – http://yoursite.com/home
Editor – http://yoursite.com/wp-admin/edit.php
Author – http://yoursite.com/wp-admin/post-new.php
Contributor – http://yoursite.com/wp-admin/edit.php
Administrator – https://yoursite.com/wp-admin
Make sure these pages already exist or are properly set up on WordPress Site.
Step 7: Save Changes
Click Save Changes to apply your settings.
Now, when a user logs in with their social account, the plugin will check their role and send them to the right page automatically.
Conclusion #
Redirecting users after social login based on their role might seem like a small detail, but it makes a big difference in how users experience your site.
Instead of sending everyone to the same page, you can guide each user based on their role and purpose.
With Happy Social Login, setting this up is simple, fast, and flexible. Once configured, it all happens automatically in the background and it gives your users a smoother and better experience.