ControlledChaos of Controlled Chaos Design
8/9/2016 - 6:42 PM

Remove Default Widgets

Remove Default Widgets

<?php

function ccd_remove_default_widgets() {
  unregister_widget( 'WP_Widget_Pages' );
  unregister_widget( 'WP_Widget_Calendar' );
  unregister_widget( 'WP_Widget_Archives' );
  unregister_widget( 'WP_Widget_Links' );
  unregister_widget( 'WP_Widget_Meta' );
  unregister_widget( 'WP_Widget_Search' );
  unregister_widget( 'WP_Widget_Text' );
  unregister_widget( 'WP_Widget_Categories' );
  unregister_widget( 'WP_Widget_Recent_Posts' );
  unregister_widget( 'WP_Widget_Recent_Comments' );
  unregister_widget( 'WP_Widget_RSS' );
  unregister_widget( 'WP_Widget_Tag_Cloud' );
  unregister_widget( 'WP_Nav_Menu_Widget' );
}

add_action( 'widgets_init', 'ccd_remove_default_widgets' );

?>

Remove Default Widgets

WordPress Snippet