Created
September 2, 2021 06:57
-
-
Save dr5hn/2bfb81bc57bac18184d8827b523634c6 to your computer and use it in GitHub Desktop.
How To Disable Widget Block Editor In WordPress 5.8+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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