WordPress – Unregister all Widgets

Posted by on Oct 20, 2009 in Wordpress | 0 comments

In my investigations to fix a problem with a clients site. I found the need to disable a single widget. The function below will unregister all of your widgets. Use the following code in your functions.php file and refresh or load a page from your site, after that remove the function from functions.php and your finished.
<?php 
     update_option( 'sidebars_widgets', $null ); 
?>
468 ad

Leave a Reply