-
Hello,
As you know, WordPress’ wp_redirect lets us set redirections simply by adding a snippet.
The good thing about it is that we can wrap that snippet with a condition and also check the user (like if the user is logged in or logged out, and if logged in, then the user’s role and…) and this helps us have smarter (or better to say, more accurate) redirections.
There are pages in our website that we want to redirect the guests to other pages, but we want to let the members view the content of them, and there are many other pages that we want to redirect pretty much anyone except one single role. (this currently is not possible using Rank Math’s redirections as it doesn’t let us check the user). So, we ended up adding a bunch of snippets to have those redirections using wp_redirect template_redirect.
But it would be great if you add an option in Redirections in Rank Math to let us check the user’s status (guest or logged in) and role. This will help us manage all our redirections in one place and keep things organized.
Thanks
The ticket ‘User Role selection on Redirection’ is closed to new replies.