Skip to content

Instantly share code, notes, and snippets.

@dr5hn
Created September 2, 2021 06:57
Show Gist options
  • Save dr5hn/2bfb81bc57bac18184d8827b523634c6 to your computer and use it in GitHub Desktop.
Save dr5hn/2bfb81bc57bac18184d8827b523634c6 to your computer and use it in GitHub Desktop.
How To Disable Widget Block Editor In WordPress 5.8+
// Ref: https://wpcodeus.com/disable-widget-block-editor-in-wordpress-5-8/
/**
* Disable Default Lazy Loading In WordPress
* In order to disable widget block editor in WordPress by default,
* you need to add the following code into your themes functions.php file.
*/
// Disables the block editor from managing widgets in the Gutenberg plugin.
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false' );
// Disables the block editor from managing widgets.
add_filter( 'use_widgets_block_editor', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment