How to Disable Widget Block Editor of WordPress – (Get Old Widget Back) In this quick video, I have explained how to get your old widget editor back in WordPress. No need to install any plugin simply disable this block widget editor with a simple code that you need to paste in functions.php of the Theme editor.
Copy the Plugin Script below:
//disable the brand new WordPress widget editor add_filter( ‘use_widgets_block_editor’, ‘__return_false’ );
Restoring the classic Widgets Editor
There are several ways to disable the new Widgets Block Editor.
Using remove_theme_support
Using remove_theme_support
Themes may disable the Widgets Block Editor by calling remove_theme_support( 'widgets-block-editor' )
.
For example, a theme may have the following PHP code in functions.php
.
1
2
3
4
|
function example_theme_support() { remove_theme_support( 'widgets-block-editor' ); } add_action( 'after_setup_theme' , 'example_theme_support' ); |
Using the Classic Widgets plugin Using the Classic Widgets plugin
End-users may disable the Widgets Block Editor by installing and activating the Classic Widgets plugin.
With this plugin installed, the Widgets Block Editor can be toggled on and off by deactivating and activating the plugin.
Top ↑
Using a filter Using a filter
the use_widgets_block_editor
filter controls whether or not the Widgets Block Editor is enabled.
For example, a site administrator may include the following PHP code in a mu-plugin to disable the Widgets Block Editor.
1
|
add_filter( 'use_widgets_block_editor' , '__return_false' ); |
For more advanced uses, you may supply your own function. In this example, the Widgets Block Editor is disabled for a specific user.
1
2
3
4
5
6
7
|
function example_use_widgets_block_editor( $use_widgets_block_editor ) { if ( 123 === get_current_user_id() ) { return false; } return $use_widgets_block_editor ; } add_filter( 'use_widgets_block_editor' , 'example_use_widgets_block_editor' ); |
Final Words:
Disabling the widget block editor in WordPress can be a simple and effective way to regain access to the old widget editor.
Following the steps in this quick video, you can easily disable the block widget editor without needing additional plugins. Simply paste the provided code into the functions.php file of your Theme editor, and you’ll have your old widget editor back in no time.
This can be particularly helpful for those who prefer the familiarity and functionality of the previous widget editor. Take control of your WordPress widgets today and enjoy a seamless editing experience.