WordPress Snippets

How to Disable Gutenberg Widget Block Editor

By ThemesDNA1 min read

Share:

Do you want to disable the new widget block editor page of Gutenberg and brings back the old widgets page? Using a one of the code given below you can restore the previous widgets settings screens and disables the block editor from managing widgets. Add "Code 1" or "Code 2" into your theme's functions.php file:

Code 1:

// Disables the block editor from managing widgets in the Gutenberg plugin.
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false', 100 );

// Disables the block editor from managing widgets.
add_filter( 'use_widgets_block_editor', '__return_false' );

Code 2:

if ( ! function_exists( 'themesdna_activate_classic_widgets' ) ) :
function themesdna_activate_classic_widgets() {
    remove_theme_support( 'widgets-block-editor' );
}
endif;
add_action( 'after_setup_theme', 'themesdna_activate_classic_widgets' );

Don't forget to save the functions.php.


Alternative Method:
If you don't need to edit the functions.php file of your theme, install and activate this plugin and the old widgets page will be back: https://wordpress.org/plugins/classic-widgets/

Premium WordPress themes One-time payment   /   Lifetime updates

Ready to Build?

Get the ThemesDNA bundle.

Get all premium ThemesDNA themes with lifetime updates and unlimited website usage for a one-time payment.

  • 56 premium themes
  • Lifetime updates
  • Unlimited websites
  • No renewals

The complete premium theme bundle

$75

One payment. No renewals.

Get the ThemesDNA Bundle — $75