Created
October 25, 2019 09:18
-
-
Save duongthanhthai/35387c839dbd685d7227519d097be843 to your computer and use it in GitHub Desktop.
Remove default admin dashboard widgets (Activity, WordPress News, Quick Draft and At a Glance) from the WordPress admin dashboard for all users.
This file contains 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 remove_dashboard_meta() { | |
remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' ); // Activity | |
remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' ); // WordPress News | |
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); // Quick Draft | |
remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); // At a Glance | |
} | |
add_action( 'admin_init', 'remove_dashboard_meta' ); |
Author
duongthanhthai
commented
Jul 25, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment