WordPress – Unregister all Widgets

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 ); 
?>

Leave a Reply

Your email address will not be published. Required fields are marked *