I want a user to only be able to view a single category type when clicking "posts" in admin. I've tried messing with list_terms_exclusions, but that only seems to be effecting the category management page. Can anyone point me in the correct direction?
I found a hacky solution involving redirecting the user:
if ((basename($_SERVER['SCRIPT_NAME']) == 'edit.php')) {
// your code here
$author = wp_get_current_user();
if(isset($author->roles[0])){
$current_role = $author->roles[0];
}else{
$current_role = 'no_role';
}
if($current_role == 'ai1ec_event_assistant' && ($_GET['post_type']==''&&$_GET['category_name']=='')){
header("Location:/wp-admin/edit.php?category_name=events-list");
}
}