Created
May 9, 2013 17:31
-
-
Save spearsmarketing/5549087 to your computer and use it in GitHub Desktop.
Unregister Default WordPress Widgets. Add to functions.php.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**** Remove all wp widgets ****/ | |
function unregister_widgets(){ | |
unregister_widget( 'Akismet_Widget' ); | |
unregister_widget( 'WP_Widget_Pages' ); | |
unregister_widget( 'WP_Widget_Calendar' ); | |
unregister_widget( 'WP_Widget_Links' ); | |
unregister_widget( 'WP_Widget_Recent_Posts' ); | |
unregister_widget( 'WP_Widget_Tag_Cloud' ); | |
unregister_widget( 'WP_Widget_Meta' ); | |
unregister_widget( 'WP_Widget_Recent_Comments' ); | |
unregister_widget( 'WP_Nav_Menu_Widget' ); | |
unregister_widget( 'WP_Widget_RSS' ); | |
unregister_widget( 'WP_Widget_Akismet' ); | |
unregister_widget( 'Akismet_Widget' ); | |
} | |
add_action( 'widgets_init', 'unregister_widgets' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment