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/

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

For adding code blocks wrap the code in three backticks. Markdown should work.
Provide a URL of your site/webpage if something is not working.
magnifiercross
>
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: