Remove Un-necessary Elements from WordPress Dashboard


Simple add this into functions.php

/* Remove unnecessary items from Dashboard */
function remove_dashboard_meta() {
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );
remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );
}
add_action( 'admin_init', 'remove_dashboard_meta' );

/* Removes some menus by page. */
function wpdocs_remove_menus(){
	remove_menu_page( 'edit-comments.php' );
//	remove_menu_page( 'tools.php' );
}
add_action( 'admin_menu', 'wpdocs_remove_menus' );

// hide admin bar wordpress logo
function admin_bar_logo_remove() {
        global $wp_admin_bar;
        /* Remove their stuff */
        $wp_admin_bar->remove_menu('wp-logo');
}
add_action('wp_before_admin_bar_render', 'admin_bar_logo_remove', 0);

Leave a Reply

Your email address will not be published.