How to disable widget block editor of WordPress?
Asked Answered
S

5

7

WP 5.8 comes with a new system to manage events named "Widgets Block Editor". How can I disable this new system and restore the classic widget editor of WordPress?

Sihunn answered 17/7, 2021 at 10:34 Comment(0)
S
9

To disable the new WordPress widget editor system you can use one of following methods.

1. Install and Activate the Disable Widget Block Editor plugin.

2. Use use_widgets_block_editor filter to disable it. You can place following code in your theme functions.php file or your plugin.

add_filter( 'use_widgets_block_editor', '__return_false' );

3. Use following code in functions.php of your theme to declare that your theme doesn't support the new widget editor system.

remove_theme_support( 'widgets-block-editor' )
Sihunn answered 17/7, 2021 at 10:34 Comment(0)
N
38

Method 1: Do you want to disable the new widget block editor page of Gutenberg and bring back the old widgets page? You can do that simply by adding this line into your theme's functions.php file:

// 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. renamed from wp_use_widgets_block_editor
add_filter( 'use_widgets_block_editor', '__return_false' );

Don't forget to save the functions.php file.

Method 2: If you don't need to edit the functions.php file of your theme, install and activate any one plugin, and the old widgets page will be back:

  1. https://wordpress.org/plugins/disable-gutenberg/
  2. https://wordpress.org/plugins/classic-widgets/

Tested & working for me.

Hope this is helpful for you.

Thanks in advance

Navigation answered 20/7, 2021 at 9:36 Comment(5)
Thanks, method one worked using the code snippet plugin, this is because my server panel spinupwp for security purpose disabled file editing in the admin area.Triphylite
Thank you absolutely detest what Automattic did to widgets instead of spending their time optimizing all their shittily slow code and atrocious database queriesFermentation
Thank god, that thing is embarassing.Kennith
@MarekMaurizio For what?Navigation
For helping me get rid of the widget block editor, it wans't usable.Kennith
S
9

To disable the new WordPress widget editor system you can use one of following methods.

1. Install and Activate the Disable Widget Block Editor plugin.

2. Use use_widgets_block_editor filter to disable it. You can place following code in your theme functions.php file or your plugin.

add_filter( 'use_widgets_block_editor', '__return_false' );

3. Use following code in functions.php of your theme to declare that your theme doesn't support the new widget editor system.

remove_theme_support( 'widgets-block-editor' )
Sihunn answered 17/7, 2021 at 10:34 Comment(0)
J
5
// 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' );

It appears that one of the filters has been renamed. It is no longer "wp_use_widgets_block_editor", it's just "use_widgets_block_editor". The most upvoted answer by @Savan Dholu should be edited to reflect that (I'm afraid I can't comment as I'm missing enough reputation * ROLLEYES *).

Jana answered 27/7, 2021 at 9:42 Comment(1)
plussing to make sure you have the reputation.Bergeron
S
0

enter image description here

You can install the plugin (rather than codes that might break your website) which is introduced in the new Widget Editor guide: Classic Widgets

Subarid answered 25/7, 2021 at 11:26 Comment(0)
F
0

Simply, use the function by WordPress:

remove_theme_support( 'widgets-block-editor' );

But, it's recommended to have it inside the 'after_setup_theme' hook.

function example_theme_support() {
    remove_theme_support( 'widgets-block-editor' );
}
add_action( 'after_setup_theme', 'example_theme_support' );
Furlong answered 26/4 at 13:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.