How to Disable Widget Blocks and Use Classic Widgets Instead
How to Disable Widget Blocks and Use Classic Widgets Instead – Disabling the block-based widget editor and reverting to classic widgets in WordPress can be desirable for users who prefer the traditional widget management interface.
The block-based editor, introduced in WordPress 5.8, offers more flexibility and control but might not be suitable for everyone due to its complexity or potential compatibility issues with certain themes or plugins.
Disable Widget Blocks and Use Classic Widgets Instead: Understanding the Change
The switch to block-based widgets is part of WordPress’s broader initiative to unify the user interface under the Gutenberg project.
While this adds versatility, it can complicate the widget management process for users accustomed to the older, simpler interface.
Methods to Revert to Classic Widgets
There are two primary methods to disable the block-based widget editor and restore the classic widgets: using a plugin or adding custom code. Each method has its advantages depending on your preferences for managing your WordPress site.
Using a Plugin
Using a plugin is the easiest method to revert to classic widgets. The “Classic Widgets” plugin, officially developed by the WordPress team, is designed specifically for this purpose.
Steps to use the Classic Widgets plugin:
- Go to Plugins > Add New in your WordPress admin dashboard.
- Search for “Classic Widgets.”
- Install and activate the plugin.
- Once activated, the plugin automatically disables the block-based widget editor and restores the classic widgets interface.
This method is straightforward and does not require any coding skills. It’s ideal for users who want a simple solution and might consider switching back in the future.
Disable Widget Blocks by Using Custom Code
For those who prefer not to increase their site’s plugin count or require a more permanent solution, adding custom code is another viable option. This can be done either through the theme’s functions.php
file or using a site-specific plugin.
Option 1: Using the Theme’s functions.php
File
Adding code to your theme’s functions.php
file can quickly switch back to classic widgets. Here’s how you can do it:
// Disable block editor for widgets
add_filter('use_widgets_block_editor', '__return_false');
This code snippet disables the block-based widgets editor, reverting the widgets area to the classic interface.
Option 2: Using a Site-Specific Plugin for Custom Code Snippets
Using a site-specific plugin for custom code snippets is safer than modifying the functions.php
file because it prevents loss of customizations when updating the theme.
Steps to use a code snippet plugin:
- Install the “Code Snippets” plugin from the WordPress plugin repository.
- Activate the plugin and go to Snippets > Add New.
- Paste the same code snippet provided above into the new snippet area.
- Name your snippet (e.g., “Disable Block-Based Widgets“), save it, and activate it.
This approach provides a clean way to manage custom code and is easy to reverse if needed.
Wrapping Up
Choosing between a plugin and custom code depends on your specific site management preferences and future plans for using WordPress features.
Both methods effectively revert the widget editor to its classic form, allowing users to manage widgets in a manner they find most familiar and straightforward.