How to redirect users after logging in
When you use the Password Protected Categories plugin to control who can access each category on your WordPress site, you might want to automatically redirect users to a specific page after they login. For example, perhaps you want to redirect them to their own main category page.
The best way to do this depends on what type of protection you are using.
Password protection
How to redirect users after logging into a protected category:
- Make sure users are logging in via the central category login page, instead of going directly to the category they are trying to access.
- Add a 301 redirect from the protected category to wherever you want to redirect them after they unlock the category. (You can do this using a redirections plugin such as Redirection).
When someone enters the correct password on the central login page, the Password Protected Categories plugin will redirect them to the individual category page. You can then redirect them to another URL, as needed.
User or role protection
If you have restricted categories to specific logged in users or roles, then what happens after people log into their accounts comes from WordPress itself rather than Password Protected Categories. This means that you can use any login redirect plugin to choose what happens when people login.
We particularly recommend the LoginWP plugin. This lets you add fine-grained rules for login redirections. For example, you can set a URL for users to be redirected to depending on their user role or even their individual username. This is a good way to redirect people to their category after they login.