Unregister WordPress Default Widgets

Use this code in the functions.php file to remove a single WordPress Default Widget.

1
2
3
4
5
/** Remove the default WordPress Tag Cloud Widget */
add_action( 'widgets_init', 'unregister_default_tag_cloud_widget' );
function unregister_default_tag_cloud_widget() {
    unregister_widget( 'WP_Widget_Tag_Cloud' );
}

Or, use this code in the functions.php file to unregister/remove multiple WordPress Default Widgets.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
/** Unregister WordPress Default widgets */
function remove_dashboard_meta() {
        remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
        remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );
        remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );
        remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );
        remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
        remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );
        remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
        remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );
        remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');//since 3.8
}
add_action( 'admin_init', 'remove_dashboard_meta' );
}
1
remove_action( 'welcome_panel', 'wp_welcome_panel' );
1
2
3
4
function remove_akismet_widget() {
        unregister_widget( 'Akismet_Widget' );
}
add_action( 'widgets_init', 'remove_akismet_widget', 11 );