Posted By

vagrantradio on 09/03/10


Tagged

wordpress


Versions (?)

Remove WordPress Default Widgets


 / Published in: PHP
 

Removes all but the text widget, look them up: /wp-includes/default-widgets.php.

  1. add_action( 'widgets_init', 'my_unregister_widgets' );
  2. function my_unregister_widgets() {
  3. unregister_widget( 'WP_Widget_Pages' );
  4. unregister_widget( 'WP_Widget_Calendar' );
  5. unregister_widget( 'WP_Widget_Archives' );
  6. unregister_widget( 'WP_Widget_Links' );
  7. unregister_widget( 'WP_Widget_Categories' );
  8. unregister_widget( 'WP_Widget_Recent_Posts' );
  9. unregister_widget( 'WP_Widget_Search' );
  10. unregister_widget( 'WP_Widget_Tag_Cloud' );
  11. unregister_widget( 'WP_Widget_RSS' );
  12. unregister_widget( 'WP_Widget_Meta' );
  13. unregister_widget( 'WP_Widget_Recent_Comments' );
  14. unregister_widget( 'WP_Nav_Menu_Widget' );
  15. }

Report this snippet  

You need to login to post a comment.