Use this code in the functions.php
file to remove a single WordPress Default Widget.
/** 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.
/** 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' );
}
remove_action( 'welcome_panel', 'wp_welcome_panel' );
function remove_akismet_widget() {
unregister_widget( 'Akismet_Widget' );
}
add_action( 'widgets_init', 'remove_akismet_widget', 11 );