Tutorials WordPress How to Remove all WordPress Widgets in Admin Dashboard

How to Remove all WordPress Widgets in Admin Dashboard

In this video tutorial, we will see how to remove all widgets from your WordPress Dashboard. When you log in to your WordPress website admin dashboard, you will notice several widgets such as Activity Stream, WordPress News, Quick Draft and few others widgets based on user role.

Sometimes Widgets are very useful but, if you want to remove them, then this little hack will help you. You can remove those widgets either by using our Smart Dashboard Extras WordPress Plugin or you can directly use the PHP code snippet.

Using Smart Dashboard Extras WordPress Plugin

You may install the plugin directly via the built-in WordPress plugin installer or using the FTP method. If you use FTP method, you first need to download Plugin form WordPress plugin directory.

  1. Once downloaded, Unzip st-smart-dashboard-extras.zip inside the /wp-content/plugins/directory for your site
  2. Activate the plugin through the \’Plugins\’ admin menu in WordPress
  3. Click on the “Smart Dashboard Extra” menu item in your WordPress dashboard to customize the plugin settings.
  4. Select “Remove all WordPress Dashboard Widgets” from Dashboard Customisation settings tab and click “Save Changes” button.

Remove all WordPress Widgets for non Admin

Or if you’re familiar with php code, you can directly add the following code snippets to your functions.php file.

//Remove Dashboard Metabox Widgets for all users except Admin
add_action('wp_dashboard_setup', 'stsd_remove_dashboard_widget' );
function stsd_remove_dashboard_widget() {
	if (!current_user_can('manage_options')){
		global $wp_meta_boxes;
		unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
		unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
		unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
		unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
		unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
		unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
		unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
		unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);		
		unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);
	}
} 

The above code snippet, removes all of the default WordPress widgets for users other then administrators.

Total
0
Shares
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
FranciscoVillen
FranciscoVillen
6 years ago

Thanks! Great tutorial, it was very useful.

crc
crc
3 years ago

how to hide the new option of wp5.0.2 Welcome @ New Editor from deshboard

Previous Post
Wordpress Tutorials

How to Limit Authors and Contributors to their Own Post in WordPress

Next Post
URL Shortening Services Similar To Google URL Shortener

URL Shortening Services Similar To Google URL Shortener and TinyURL

Related Posts
By clicking “Allow All”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookie Notice
Allow All
2
0
Would love your thoughts, please comment.x
()
x