How to redirect if user has specific role in wordpress

  • home
  • /
  • WordPress
  • /
  • How to redirect if user has specific role in wordpress

I created one simple function when you require redirect of a specific role (Administrator, Subscriber, Contributor, Author, Editor) in WordPress

Place below snipped to your theme’s functions.php. It will redirect any users with the user role of ‘subscriber’ to your chosen URL.

  • Share:

Leave a Comment

sing in to post your comment or sign-up if you dont have any account.

17 + six =

This site uses Akismet to reduce spam. Learn how your comment data is processed.