Hi,
You can update your code with this,
In includes/front-end-redirection.php
I added after 31. line
$current_roles1 = $current_user->roles[1];
$current_roles2 = $current_user->roles[2];
$current_roles3 = $current_user->roles[3];
$current_roles4 = $current_user->roles[4];
And i added after 52. line
if(in_array($current_roles1, $the_rrw_roles ))
{
$destination = $post->post_name;
$destination_url = get_permalink($destination);
header("Location:".$destination_url); /* Redirect user */
}
if(in_array($current_roles2, $the_rrw_roles ))
{
$destination = $post->post_name;
$destination_url = get_permalink($destination);
header("Location:".$destination_url); /* Redirect user */
}
if(in_array($current_roles3, $the_rrw_roles ))
{
$destination = $post->post_name;
$destination_url = get_permalink($destination);
header("Location:".$destination_url); /* Redirect user */
}
if(in_array($current_roles4, $the_rrw_roles ))
{
$destination = $post->post_name;
$destination_url = get_permalink($destination);
header("Location:".$destination_url); /* Redirect user */
}
Now it can be read first 5 role by users.
Thank you ??
-
This reply was modified 7 years, 9 months ago by anymaa.
-
This reply was modified 7 years, 9 months ago by anymaa.
-
This reply was modified 7 years, 9 months ago by anymaa. Reason: Misspelling