Hide Admin Menu Items from Specific Users in Wordpress
If you develop a site for a client add this function to your themes functions.php file and change the user ID (in the example below it's 3) to the ID of the user you want to hide certain admin menu items. You can get the user's ID by hovering over the users name and looking for "user_id=3" in the bottom left corner of your browser or click on the user name and check the ID in the URL In the function below I've added all the admin page names for reference but commented out // the pages I want the user to see. function remove_menus(){ $user_ID = get_current_user_id(); if ($user_ID == '3') { //remove_menu_page( 'index.php' ); //Dashboard remove_menu_page( 'edit.php' ); //Posts //remove_menu_page( 'upload.php' ); //Media //remove_m...