1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// Allow editors to see Appearance menu $role_object = get_role( 'editor' ); $role_object->add_cap( 'edit_theme_options' ); function hide_menu() { // Hide theme selection page remove_submenu_page( 'themes.php', 'themes.php' ); // Hide widgets page remove_submenu_page( 'themes.php', 'widgets.php' ); // Hide customize page global $submenu; unset($submenu['themes.php'][6]); } add_action('admin_head', 'hide_menu');
You can clone a snippet to your computer for local editing. Learn more.