Title: {wp-core}{Thme:Twenty Twelve } Remove Admin Submenu items
Last modified: August 21, 2016

---

# {wp-core}{Thme:Twenty Twelve } Remove Admin Submenu items

 *  Resolved [May_68](https://wordpress.org/support/users/may_68/)
 * (@may_68)
 * [13 years ago](https://wordpress.org/support/topic/remove-admin-submenu-items/)
 * Hello , I am just finishing off a site for a client and I was editing the role
   capabilites and cleaning up the menu. I have a made a child theme for twenty 
   twelve and manage to remove all the menus and submenus i needed from the editor
   role. But been having **problems to remove the:**
    -  Apearence>Theme options,
    -  Apperance>Header
    - and Appearence >Background
 * .
 * Initialy i used the :
 *     ```
       // Edit Editor User Roles
       function add_theme_caps() {
   
         $role = get_role( 'editor' ); // ou subscriber, nao sei que role tem o cliente
         $role->add_cap('edit_theme_options' );
         $role->add_cap('moderate_comments' );
       }
       ```
   
 * then after couldnt really get to the submenu items that way so i used the following
   method .
 *     ```
       function my_remove_menu_pages() {
       	if(!current_user_can('add_users')) {
       		remove_menu_page('options-general.php'); // Settings
       		remove_menu_page('link-manager.php'); // Links
       		remove_menu_page('tools.php'); // Tools
       		remove_menu_page('edit-comments.php'); //comments
       		remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=post_tag' ); // Post tags
   
       		remove_submenu_page ('themes.php', 'themes.php');
       		remove_submenu_page( 'themes.php', 'themes.php?page=options-framework');
       		remove_submenu_page( 'themes.php', 'themes.php?page=options_framework' );
       		remove_submenu_page( 'themes.php', 'themes.php?' );
       		remove_submenu_page( 'themes.php', 'themes.php?page=costum_background' ); 
   
       		//unset($submenu['themes.php'][5]); // Removes 'Themes'.
   
       	}
       }
       add_action( 'admin_init', 'my_remove_menu_pages' );
       ```
   
 * All seems to work fine except the the remove os those last three items.
    In the
   bottom i have commented another way to do the same thing but not really sure 
   who is who with the number system.
 * Can any one helpme with this ?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [13 years ago](https://wordpress.org/support/topic/remove-admin-submenu-items/#post-3690718)
 * Try it with this:
 *     ```
       remove_submenu_page ('themes.php', 'custom-header');
       remove_submenu_page( 'themes.php', 'custom-background');
       ```
   
 * is ?page=options_framework from a plugin?
 * Maybe look into a plugin:
    [http://wordpress.org/extend/plugins/adminimize/](http://wordpress.org/extend/plugins/adminimize/)
 *  Thread Starter [May_68](https://wordpress.org/support/users/may_68/)
 * (@may_68)
 * [13 years ago](https://wordpress.org/support/topic/remove-admin-submenu-items/#post-3690722)
 * TCHAAARAAAAAA … Thank you very much, it worked like a charm, cant believe i didn’t
   thought of that.
    Good thing you guys are here …
 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [13 years ago](https://wordpress.org/support/topic/remove-admin-submenu-items/#post-3690743)
 * You’re welcome. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘{wp-core}{Thme:Twenty Twelve } Remove Admin Submenu items’ is closed 
to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/remove-admin-submenu-items/#post-3690743)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
