Remove unwanted sub-menus from WordPress Dashboard Menus

add_action( 'admin_init', 'adjust_the_wp_menu' );
function adjust_the_wp_menu()
{
   remove_submenu_page( 'themes.php', 'theme-editor.php' );
   remove_submenu_page( 'themes.php', 'nav-menus.php' );
   remove_submenu_page( 'themes.php', 'custom-background' );
}
Advertisements

Remove Unwanted WordPress Dashboard widgets

function my_custom_dashboard_widgets() {
	global $wp_meta_boxes;
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
	//wp_add_dashboard_widget('custom_help_widget', 'Help and Support', 'custom_dashboard_help');
}
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');