Hi guys. I read through this thread while working on the same issue of giving Editors access to Appearance > Menus but nothing else in the Appearance area of WordPress. I was able to accomplish this with the following (including removing the GeneratePress menu item):
// Allow editors to see Appearance menu - This only needs to run once to update the database, so you can comment it out once editors can see the Appearance menu. If you want to stop editors seeing the Appearance menu, switch add_cap with remove_cap. Alternatively, you can use the User Role Editor plugin to provide access.
$role_object = get_role( 'editor' );
$role_object->add_cap( 'edit_theme_options' );
function hide_menu() {
if (current_user_can('editor')) {
// Hide theme selection page
remove_submenu_page( 'themes.php', 'themes.php' );
// Hide GeneratePress page
remove_submenu_page( 'themes.php', 'generate-options' );
// Hide widgets page
remove_submenu_page( 'themes.php', 'widgets.php' );
// Hide customize page
global $submenu;
unset($submenu['themes.php'][6]);
}
}
This should work in your child theme functions.php file, or use something like the WPCode plugin to create a PHP code snippet.