Home > Back-end >  How to remove the only the Themes options from the Apprerance menu
How to remove the only the Themes options from the Apprerance menu

Time:07-03

I want to only remove the Themes option from the Appearance menu in the WordPress dashboard. The option I want removed is marked in red.

enter image description here

I have tried,

remove_menu_page( 'themes.php' );

But it removed the Appearance menu completely.

I found another function to remove the sub menu but unsure what the second option has to be since both Appearance and Themes are linked to wp-admin/themes.php

remove_submenu_page( 'themes.php', '')

CodePudding user response:

This will do it. Add to functions file:

function remove_menus(){  
remove_submenu_page( 'themes.php', 'themes.php');
}  
add_action( 'admin_menu', 'remove_menus' ); 
  • Related