Created
February 1, 2020 16:50
-
-
Save pavlo-bondarchuk/7ee20ac339f99c98a9d6918694f650e0 to your computer and use it in GitHub Desktop.
Removing default Dashboard Widgets
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
| function wporg_remove_all_dashboard_metaboxes() { | |
| // Remove Welcome panel | |
| remove_action( 'welcome_panel', 'wp_welcome_panel' ); | |
| // Remove the rest of the dashboard widgets | |
| remove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); | |
| remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); | |
| remove_meta_box( 'health_check_status', 'dashboard', 'normal' ); | |
| remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); | |
| remove_meta_box( 'dashboard_activity', 'dashboard', 'normal'); | |
| } | |
| add_action( 'wp_dashboard_setup', 'wporg_remove_all_dashboard_metaboxes' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment