12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Aug 9, 2019

How to Remove Themes and Theme Editor admin menu items

Sridhar Katakam

A user asks in WPDevDesign Facebook group:

Considering Oxygen completely disables the theme functions is there a way to get rid of the Admin Menu items ‘Themes’ & ‘Theme Editor’ ?

This tutorial provides the steps to remove Appearance > Themes and Appearance > Theme Editor admin menu items from WordPress admin.

Before:

After:

Step 1

Install and activate Code Snippets plugin.

Step 2

Go to Snippets > Add New.

Title: Remove Appearance > Themes and Appearance > Theme Editor admin menu items

Code:

add_action( 'admin_menu', 'wpdd_remove_menu_items', 999 );
/**
 * Remove Appearance > Themes and Appearance > Theme Editor admin menu items
 */
function wpdd_remove_menu_items() {
	remove_submenu_page( 'themes.php', 'themes.php' );
	remove_submenu_page( 'themes.php', 'theme-editor.php' );
}

Set it to run only in admin.

Save changes and activate.

Source

https://rusticated.co/difficulty/advanced/how-to-remove-items-from-the-wordpress-admin-menu/

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right