I'm trying to hide a series of posts from my editors in the admin panel based on either custom post type or category (whichever is easiest).
I tried adding a function such as:
add_action( 'admin_menu', 'my_remove_menu_pages' );
function my_remove_menu_pages() {
global $current_user;
get_currentuserinfo();
if($current_user->user_login = 'test2') {
remove_submenu_page( 'edit.php?post_type=post', 'edit.php?post_format=image&post_type=post' );
}
}
(In this snippet, I'm hiding it from one specific account) but it doesn't seem to work. Any ideas on how to do this?
current_user_can
. Will try to furnish you with details unless you/someone posts an answer in the mean time.