Remove WP standard widgets


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. //Remove WP standard Widgets
  2. add_action( 'widgets_init', 'my_unregister_widgets' );
  3. function my_unregister_widgets() {
  4. unregister_widget( 'WP_Widget_Pages' );
  5. unregister_widget( 'WP_Widget_Calendar' );
  6. unregister_widget( 'WP_Widget_Archives' );
  7. unregister_widget( 'WP_Widget_Links' );
  8. unregister_widget( 'WP_Widget_Categories' );
  9. unregister_widget( 'WP_Widget_Recent_Posts' );
  10. unregister_widget( 'WP_Widget_Search' );
  11. unregister_widget( 'WP_Widget_Tag_Cloud' );
  12. unregister_widget( 'WP_Widget_RSS' );
  13. unregister_widget( 'WP_Widget_Meta' );
  14. unregister_widget( 'WP_Widget_Recent_Comments' );
  15. unregister_widget( 'WP_Nav_Menu_Widget' );
  16. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.