Hello,
I need Controlling access to archive pages, and make a redirect to specific page for the users trying to see those archive pages but don't have permission for it.
Where I how may I set that up ?
Thank you.
Dear roman,
You can try with the Access plugin:
Disable the "Read" privilege for the specific user role:
https://toolset.com/documentation/user-guides/setting-access-control/
section "Managing Access Control for Posts, Pages and Custom Post Types"
Hello and thank you,
I allready have tried with Access, and it is OK for my custom post type. But the term pages still loads. I can't find where to set the archive pages access control.
Please create a private message zone so I can show you.
Thank you.
It is another question, since your original question has been resolved, please create new thread for new question, this will help other user to find the answers. thanks
Hello,
This is not a new question, this is still the exact same thing I am trying to do : controling access to archive and terms pages.
Thank you.
Here is a code that solved my problem.
function my_page_template_redirect()
{
if ( is_tax() && ! is_user_logged_in() )
{
wp_redirect( home_url( '/client/' ) );
exit();
}
}
add_action( 'template_redirect', 'my_page_template_redirect' );