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 Made for WordPress   /   Ready for your story

Ready to Build?

Your next great website starts here.

Build more websites with one flexible collection—and keep every theme for life.

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

The complete collection

$75

One payment. No renewals.

Get the Themes Bundle — $75