Hiding custom theme functionality using capabilities
If what you want to do is to hide the menu items you can make use of remove_menu_page and remove_submenu_page by hooking into admin_menu. In order to hide certain links based on the user’s role (in your case, Editor): function custom_remove_menus(){ // Get current user’s data $current_user = wp_get_current_user(); $user_id = $current_user->ID; // Check user’s … Read more