Created
January 11, 2025 08:12
-
-
Save Lego2012/52ea103cd096b6522acf31f3372475b7 to your computer and use it in GitHub Desktop.
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 WordPress Dashboard Widgets | |
| function bt_remove_dashboard_widgets() { | |
| remove_action( 'welcome_panel', 'wp_welcome_panel' ); // Welcome Panel | |
| remove_meta_box( 'dashboard_site_health', 'dashboard', 'normal' ); // Remove Health | |
| remove_meta_box( 'duplicator_dashboard_widget', 'dashboard', 'normal' ); // Remove Duplicator | |
| remove_meta_box( 'wsf_dashboard_widget', 'dashboard', 'normal' ); // Remove WS Form | |
| remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); // Quick Press Widget | |
| remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); // Right now | |
| remove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); // WordPress.com Blog | |
| remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' ); // Recent Drafts | |
| remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' ); // Activity | |
| remove_meta_box( 'dashboard_site_health', 'dashboard', 'normal' ); // Remove Health | |
| remove_meta_box( 'rank_math_dashboard_widget', 'dashboard', 'normal' ); // Remove Rank Math | |
| } | |
| add_action( 'wp_dashboard_setup', 'bt_remove_dashboard_widgets' ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment