WordPress introduced Gutenberg block editor with version 4.8 for editing posts and pages. After that, almost every update contains improvement in Gutenberg blocks and interface. As part of full site editing experience, WordPress 5.8 introduced widgets based block editor removing the classic widgets interface. In this article, we will explain why and how to disable widgets block editor in WordPress.
WordPress website has a standard layout for quite longtime. A simple WordPress page contains a header, footer, main content and sidebar area. You can add widgets in sidebar and footer area by navigating to “Appearance > Widgets” menu in your WordPress admin panel. WordPress was offering some default widgets like text widget, custom HTML, recent posts, categories, etc. Your theme and plugins can offer custom widgets that you can showcase in the widgets area.
This was a scenario till WordPress version 5.7 and the traditional widget area was removed with WordPress 5.8. Now, you have that popular block based Gutenberg editor replaced the traditional widgets area. Instead of dragging and dropping widgets, you can insert Gutenberg blocks as widgets.
Managing Widgets in Customizer
Similar to managing widgets under “Appearance > Widgets” section, you can also add widgets in supported area under “Appearance > Customize > Widgets” section.
Why Widgets Block Editor is a Problem?
When Gutenberg was introduced, it created lots of problems like slowing down the site. These problems forced many users to disable Gutenberg editor and continue to use the old Classic editor. Similarly, you will face lots of problems with the new widgets block editor in WordPress.
- You have to manually remove old legacy widgets and replace them with new blocks. For example, you might have inserted advertisement in the sidebar using old Custom HTML widget. Now, you need to replace that with a Custom HTML block for the widget to work properly. Otherwise, you will see errors when opening the widgets section like below. The error will say something like “The “archives” block was affected by errors and may not function properly. check the developer tools for more details”.
- Your theme and plugins may use the old widget area and create conflict with new block based widgets. You will see errors like “Notice: wp_enqueue_script() was called incorrectly. “wp-editor” script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets). Please see Debugging in WordPress for more information. (This message was added in version 5.8.0.) in /wp-includes/functions.php on line 5535”.
- New widgets area will completely slow down your work and how loading spinner forever. It may also crash your computer by utilizing large amount of memory in the browser.
- You will be easily annoyed by searching and inserting widgets when you have multiple sidebars.
- Some widgets like Custom HTML was much easier to insert advertisement code compared to Custom HTML block.
- If you have custom sidebar setup, it may not be compatible with the new block based widgets. For example, Custom Sidebars – Dynamic Sidebar Widget Area Manager will not work with new editor and you need to revert back to old widget area to continue using the plugin.
- Earlier you can save individual widget and check the published content. However, you have to save the entire area by clicking on Update” button in the new interface.
- You may find it difficult to manage widgets in customizer compared to old interface.
- There could be PHP errors with new interface due to incompatibility and you may miss the accessibility features available with old interface.
How to Disable Widgets Block Editor in WordPress?
At any case, if you are struck with the new widgets block editor, follow the below options to revert back to old widget area interface.
1. Using Classic Widgets Plugin
The first option is to use the official compatibility plugin from WordPress community developers. Similar to Classic Editor that allows using classic interface instead of Gutenberg, you have Classic Widgets plugin. This plugin will completely disable the new widgets block editor interface and allow you to use the old interface.
- Go to “Plugins > Add New” section in your WordPress admin panel.
- Search for “classic widgets” to find Classic Widgets plugin from WordPress Contributors.
- Install and activate the plugin.
- This plugin does not have any settings page.
- Once activated, it will automatically revert the block based widget area to old classic widget area.
Since this is an official WordPress plugin, you can expect this plugin will be available at least another few years (they officially claim until 2022). You have few years’ time to test and migrate old widget area section to new interface.
2. By Using Manual Code Snippet
If you do not want to use a plugin for this purpose, you can use a manual code snippet for this purpose.
- Navigate to “Appearance > Theme Editor” menu in your WordPress admin panel.
- Paste the below code at the last.
/* Disable Widgets Block Editor */ add_filter( 'use_widgets_block_editor', '__return_false' );
- Click “Update File” and save your changes.
- Now, navigate to “Appearance > Widgets” section and you should see the old classic widget interface.
Remember, it is recommended to use child theme to editor functions.php file so that your changes are retained when updating parent theme. In addition, if “Theme Editor” is disabled in admin panel, you can edit the file using FTP or File Manage app from your hosting account.
Should I Use Old or New Interface?
As mentioned, Gutenberg is the future of WordPress. Though you can disable old widgets interface, we recommend you to fix the problems and plan moving on to the new block based widgets.
- New interface will show all legacy widgets without any customizing options. You can delete those legacy widgets and replace them with equivalent Gutenberg blocks.
- It is possible to customize each block similar to editing them in post or page editor. For example, you can easily adjust the color and size of your widget headings.
- You may get same editing experience all over the site.
If your theme or plugin conflict with new widget editor interface, contact the developer and request them updating the product. Otherwise, you may need to plan for migrating to the latest supported items.
Thanks a lot! My whole work was at a halt because of this issue. I read many articles and tried out many things, none of them seemed to work. Finally, disabling gutenberg block editor did the work. My sidebar issue has been solved, but another issue still persists. I’m not able to edit the header through the customizer. Could you help me out with this?