Remove all WordPress Widgets in Admin Dashboard

Written by August 17, 2017

Hello im Sarmad gardezi and im going to tell you that how you can remove all widgets from your WordPress Dashboard. When you login 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.

Most of the time in wordpress dashboard we find these widgets very useful but some time they are so annoying or we want to prevent other website members to see them, So we need to hide them. 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 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.

[code_block_line_numbers]

//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’]);
}
}

[/code_block_line_numbers]

The above code snippet, removes all of the default WordPress widgets for users other then administrators. It will eb very small in size and doesnt effect on page load on website space if your using some small hosting plan.


Free Online Image Hosting

Host your Images Online for free & use them on Website Blogs and Social Media.

Host Image Now Featured
Online Dictator

Convert your Speech into Text. You can either copy, Download or Share it Online for free.

Try it Now Popular
My First Tweet

Find first tweet on Twitter and retweet it to amaze people.

Lets Go! Trending

           
           

Subscribe to my Email Newsletter

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 26,908 other subscribers
           
       
Custom Support

I build bespoke solutions that use the capabilities and the features of Google Apps for automating business processes and driving business productivity.

or send me a message via Facebook Messenger