Wordpress Technology

Wordpress Tips, Tutorials, Hacks

Disable Default WordPress Widgets

To deactivate the unneccessary default WordPress Widgets just insert next code in your functions.php file of your current theme. The following code should be adjusted depending on your needs;

// unregister all default WP Widgets
function unregister_default_wp_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');
}

add_action('widgets_init', 'unregister_default_wp_widgets', 1);

The function unregister_widget() is working since version 2.8 only as needs as parameters the class.


Both comments and pings are currently closed.

© 2009 | Made by Vancouver Web Design | Internet Marketing