Remove menu for the user which has ‘editor’ role in WordPress

We need to use ‘admin_menu’ hook to remove/hide menu from specific role type. Following code show example of this. First get role type then remove menu. Open functions.php and write following code. Please keep in mind that this code doesn’t remove user’s permission. That means user still can access menu directly from browser. Advertisements