allow editors to modify menus
-
Hello,
I know only the administrator role has access to the Appearance menus – themes, customize, widgets, menus, etc. – by default.
I am trying to implement code to allow the role “editor” to have access to the menus and only the menus page so they can add/modify/and delete without relying on the administrator. I have found code snippets to add to your functions.php to remove most of the appearance submenus. However, I haven’t been successful in finding a code snippet to remove the customize menu.
I have found the following in my search, but it only remove the themes, widgets, and editor submenu
// 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 remove_submenu_page( 'themes.php', 'customize.php' ); // Hide customize page global $submenu; unset($submenu['themes.php'][6]); } add_action('admin_head', 'hide_menu');
Does anyone who know how to remove the customize submenu from Appearance?
Thank you in advance.
- The topic ‘allow editors to modify menus’ is closed to new replies.