Automatically Disable Widgets

Posted on February 1st, 2011

A quick tip to disable widget functionality from wordpress theme. Add the following to your functions.php file and call it done:

<?php // disable all widgets

function disable_all_widgets($sidebars_widgets) {

$sidebars_widgets = array(false);

return $sidebars_widgets;

}

add_filter(‘sidebars_widgets’, ‘disable_all_widgets’);

?>