Title: Specific &amp; Variable Redirects after Login
Last modified: August 28, 2018

---

# Specific & Variable Redirects after Login

 *  [onyudo](https://wordpress.org/support/users/onyudo/)
 * (@onyudo)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/specific-variable-redirects-after-login/)
 * Hello,
 * Many apologies if this has been covered elsewhere, but I have searched through
   the forums and have not been able to find a previous entry that is similar to
   my situation.
 * My situation is pretty simple at first: I have User Role A that needs to go to
   Page A after login and User Role B that needs to go to Page B after login.
 * That part is simple and straightforward. I already have written code that can
   accomplish that, and there are any number of great plug-ins that do the same,
   too.
 * The core of my problem is that the client I have built a WordPress website for
   has started sending out emails to the user base which directs them to specific
   content or pages (i.e., an email with a link to an online newsletter or a special
   page).
 * So, my question:
 * How do I accommodate this variable redirect?
 * if User Group A => Page A, else
    if User Group B => Page B, else {link from email}
   => redirect to referring page
 * Is there any such plugin that can handle this, or does anyone know of a set line
   of code that would be usable?
 * Cheers, and many thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 11 months ago](https://wordpress.org/support/topic/specific-variable-redirects-after-login/#post-10630187)
 * Try [https://wordpress.org/plugins/peters-login-redirect/](https://wordpress.org/plugins/peters-login-redirect/)
 *  Thread Starter [onyudo](https://wordpress.org/support/users/onyudo/)
 * (@onyudo)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/specific-variable-redirects-after-login/#post-10630276)
 * Many thanks! I have indeed looked at that specific plugin. So far, it is not 
   producing the results I am aiming for (or, its possible that I just don’t understand
   how to make it happen using the plugin’s interface). However, more importantly,
   that specific plugin is not recognizing my user roles, which have been customized.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 11 months ago](https://wordpress.org/support/topic/specific-variable-redirects-after-login/#post-10630350)
 * Post a question there.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Specific & Variable Redirects after Login’ is closed to new replies.

## Tags

 * [login](https://wordpress.org/support/topic-tag/login/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/specific-variable-redirects-after-login/#post-10630350)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
