Do you want to restore the classic widgets editor in WordPress?
WordPress introduced the Gutenberg widget block editor to control your website’s widget areas and removed the classic widgets editor in WordPress 5.8.
Why Restore Classic Widgets Editor in WordPress?
The widget block editor gives you more control over the appearance of your widgets and offers almost all the functionalities of the classic widget editor.
However, there are many users who feel more comfortable with the classic widget editor and want to disable widget blocks, just like disabling the block editor.
Methods to Restore Classic Widgets Editor in WordPress
There are multiple ways to disable the new Widgets Block Editor in WordPress.
1. Removing Theme Support
The below code snippet removes theme support for block widgets and disables the Gutenberg block editor in your website widget area.
/**
* Disable Widgets Block Editor (Restore Classic Widgets Editor)
*/
function maverick_disable_widgets_block_editor()
{
remove_theme_support('widgets-block-editor');
}
add_action('after_setup_theme', 'maverick_disable_widgets_block_editor');
2. Using a WordPress Filter
The below code snippet disables the use of block widgets and restores the classic widget editor in your website widget area.
/**
* Disable Widgets Block Editor (Restore Classic Widgets Editor)
*/
add_filter('use_widgets_block_editor', '__return_false');
3. Classic Widgets Plugin (Not Recommended)
Non-technical users or users who are not comfortable with code may want to disable the Widgets Block Editor by installing and activating the Classic Widgets plugin.
The plugin restores the classic widget editor and disables the block widget editor right from activation.