Are you want to disable unused widget areas in your WordPress sites? If your answer is Yes, then this tutorial for you. I have shared a simple WordPress code snippet to disable unused widget areas in your WordPress admin.
Copy the below code and add at the end of your functions.php file and save it.
1 2 3 4 5 6 7 |
// disable all widget areas function disable_all_widgets($sidebars_widgets) { //if (is_home()) $sidebars_widgets = array(false); return $sidebars_widgets; } add_filter('sidebars_widgets', 'disable_all_widgets'); |
Hope this tutorial helps you, do like and share this tutorial with you friends on Facebook and Twitter. If you have any suggestion, feel free to add your comments in below comment box.
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.