WordPress comes with a bunch of widgets loaded on its dashboard. The default WordPress dashboard may seems cluttered to some users because many widgets may be irrelevant for them. Such users can easily clean their dashboard. By using
wp_dashboard_setup hook you can add/remove widgets from dashboard as shown below. function example_remove_dashboard_widgets() { // Globalize the metaboxes array, this holds all the dashboard widgets global $wp_meta_boxes; // Remove the incomming links widget unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); // Remove right now unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); } // Hoook into the 'wp_dashboard_setup' action to register our function add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets'); add_action('wp_dashboard_setup', 'example_add_dashboard_widgets'); function example_add_dashboard_widgets() { wp_add_dashboard_widget('example', 'Example', 'example_widget_callback'); } function example_widget_callback() { echo 'Its a custom widget!'; }
WordPress
Add remove Wordpress dashboard widgets
WordPress comes with a bunch of widgets loaded on its dashboard. The default WordPress dashboard may seems cluttered to some users because many widgets may be i
· 5 min read · By Tahir Yasin
Related posts
WordPress
How to reindex tables with MySQL
Learn how to remove AUTO_INCREMENT from the WordPress wp_posts ID column, manage primary keys, verify database changes, and safely modify your WordPress database structure.
WordPress
Adding Custom Fields to WordPress User Profile Page
Adding custom profile fields in WordPress made easy through action hooks. .Most of the solutions available on internet tell you about adding custom fields on &#
WordPress
Multi Image Upload
Multi Image Upload adds a meta box to upload multiple images for posts and pages. You can enable it for custom post types also. Download: http://wordpress.org/p