Xóa các Dashboard Widget ở màn hình bắt đầu Wordpress - Remove all the default WordPress dashboard widgets
Thêm đoạn code phía dưới vào function.php để Xóa các Dashboard Widget ở màn hình bắt đầu Wordpress - Remove all the default WordPress dashboard widgets
function wct_meta_boxes() {
/**
* Removes the "Welcome Panel" widget
*/
remove_action('welcome_panel', 'wp_welcome_panel');
/**
* Removes the "Dashboard PHP Notification" widget
*/
remove_meta_box( 'dashboard_php_nag', 'dashboard', 'normal' );
/**
* Removes the "Right Now" widget that tells you post/comment counts
* and what theme you're using.
*/
remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );/**
* Removes the recent comments widget
*/
remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );/**
* Removes the incoming links widget.
*/
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );/**
* Removes the plugins widgets that displays the most popular,
* newest, and recently updated plugins
*/
remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );/**
* Removes the quick press widget that allows you post right from the dashboard
*/
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );/**
* Removes the widget containing the list of recent drafts
*/
remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );/**
* Removes the "WordPress Blog" widget
*/
remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );/**
* Removes the "Other WordPress News" widget
*/
remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );/**
* Removes the "Site Health" widget
*/
remove_meta_box('dashboard_site_health', 'dashboard', 'normal');/**
* Removes the "Recent activity" widget
*/
remove_meta_box('dashboard_activity', 'dashboard', 'normal');
}
add_action( 'wp_dashboard_setup', 'wct_meta_boxes' );
Trao đổi về dự án của bạn!


