As developers, we like to keep up with WordPress News.
Most likely our clients do not care or understand WordPress news. Here is how I hide unwanted widgets from the WordPress Admin dashboard by including this code snippet in the themes function.php file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* REMOVE DASHBOARD WIDGETS | |
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', 'normal' ); | |
remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' ); | |
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); | |
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); | |
//*remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' ); | |
//*remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' ); | |
//*remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); | |
} | |
add_action( 'admin_init', 'remove_dashboard_meta' ); |
Comment functions you want to keep by adding //* to line beginning.
I like to keep Recent Drafts, Recent Comments and the Right Now widget.