Redirect User based on role or capability on login

Redirect user based on role or capability on login. You can add else if’s to direct different users. has_cap accepts roles or capabilities. So you could use, “edit_posts” for a check.

Add to functions file.

Leave a Reply

Your email address will not be published. Required fields are marked *

+ 13 = 21