Remove Default Widgets

Occasionally while adding custom widgets to WordPress, you also may what to remove some of the defaults widgets to make yours easier to find.

Here is a list of the default widgets as of 3.4

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' );

And, if you need make your own list you can use:

global $wp_widget_factory;

var_dump( $wp_widget_factory );

Leave a Reply

Your email address will not be published. Required fields are marked *