How to Disable the Gutenberg Block Editor on the Widget page

Last Updated on July 28, 2023 by Mike Kipruto

Since WordPress 5.8, the Gutenberg block editor is enabled by default for widgets in the admin panel. 

To disable the block editor for widgets can easily be done using the following code:

PHP
/**
 * How to disable the block editor for WordPress widgets
 * @link https://kipmyk.co.ke/how-to-disable-the-gutenberg-block-editor-on-the-widget-page/
 * */ 
add_filter( 'use_widgets_block_editor', '__return_false' );

To do this, we use the use_widgets_block_editor hook to turn off the block editor on the widgets page.

Leave a Reply

Your email address will not be published. Required fields are marked *