How to disable Block-based Widgets Editor in WordPress 5.8?

By Last Updated July 29, 2021
Gutenberg

WordPress 5.8 is shipped with the Block-based Widgets editor, making it part of the WordPress core. The new widget editor can be accessed from Appearance -> Widgets or through the Customizer (Appearance -> Customizer -> Widgets). Blocks can now be added to a widget area using the new widget editor. Classic/existing Widgets and third party widgets will continue to work and can be configured using the block-based editor, they are now called Legacy Widget Block.

Screenshot of the new block-based widget editor

Making the block-based Widgets editor part of the core does not mean that the end-users are ready to adopt it, yet. If you are not prepared to embrace block-based widgets, the following methods show how to disable the block-based widgets editor.

4 ways to disable block-based Widgets Editor in WordPress.

Install and Activate the Classic Widgets plugin

The WordPress Contributors team have released a new plugin, Classic Widgets that will restore the previous (“classic”) Widgets screen. The plugin does not come with additional settings, activating the plugin will enable the classic widget settings screen.

Screenshot of the Classic Widgets Plugin

To install the plugin;

  1. Navigate to Plugins -> Add New
  2. On the Add Plugins screen, search for Classic Widgets
  3. Install and Activate.

Using the Disable Gutenberg Plugin

Disable Gutenberg is a plugin that’s been widely used since the inception of the block editor. As of mid-July, 2021 the plugin is being used on over 600,000 WordPress instances.

With Disable Gutenberg you can disable Gutenberg completely, or selectively disable for user roles, post types and admin screens.

To disable Block-based Widgets Editor via Disable Gutenberg plugin;

  1. Install and activate the plugin from Plugins -> Add New -> Search “Disable Gutenberg
  2. Navigate to Settings -> Disable Gutenberg
  3. Scroll down to the ‘More Tools’ section and check the ‘Classic Widgets’ checkbox
  4. Save Changes.
Screenshot of the option in Disable Gutenberg Plugin that restores Classic Widgets.

Please note that Checking the ‘Complete Disable’ option does not restore the Classic Widgets Screen, at least not at the time this article is being written.

Using the remove_theme_support

Theme authors and end-users can include the following snippet in a theme’s setup/functions.php file to disable the new Widgets Block editor. This is achieved by calling the remove_theme_support( ‘widgets-block-editor’ )

function remove_wbe_theme_support() {
    remove_theme_support( 'widgets-block-editor' );
}
add_action( 'after_setup_theme', 'remove_wbe_theme_support' );

Using the use_widgets_block_editor filter

Including the following PHP code in a plugin or a theme’s functions.php file will disable block-based widgets editor.

add_filter( 'use_widgets_block_editor', '__return_false' );

Please consider sharing 💕

Leave a Comment