WordPress 5.0 has just been released, however, not everyone loves the new block editor – Gutenberg. This article will guide you how to simply disable Gutenberg with just one line of code, no plugins needed.
Why disable Gutenberg?
Gutenberg is the new editor added in WordPress 5.0. This editor promises to bring a whole new change and experience to users.
Nevertheless, after launching, it received plenty of criticism (more than praises) as it caused some problems for users, such as:
- Unable to use powerful features of the editor toolbar brought by the TinyMCE Advanced plugin.
- Can’t integrate the short-code buttons from other plugins into the editor toolbar.
- Articles editing, images inserting are a bit more difficult than the previous editor.
- Meta boxes are not always well supported.
- The WordPress 5.0.1 conflicts with Yoast SEO plugin 9.2.1
- There are other conflicted plugins such as ACF, WPML
Therefore, while Gutenberg is not really stable, it should be disabled. Otherwise, if you are using other plugins and you have conflicting problems, you should disable it and go back to the old editor interface.
How to disable Gutenberg via code?
It’s simple to disable Gutenberg, all you need to do is add the following code into the functions.php file in your theme:
add_filter( 'use_block_editor_for_post', '__return_false' );
This command will hook into the use_block_editor_for_post filter to change the decision whether to use Gutenberg when writing articles or not. The __return_false function is a WordPress’ built-in function, which returns false, ie does not use Gutenberg.
Simple, isn’t it? No need to install any plugins for the site!
How to disable Gutenberg completely?
To do that, we need to write more code. The easiest way to disable Gutenberg is to install an available plugin, Disable Gutenberg.
Enjoy your time with Gutenberg!
- Gutenberg and the future of Meta Box
- How to Disable Gutenberg and Use the WordPress Classic Editor
- Meta Box is now compatible with Gutenberg
- An Update on WordPress 5.0, Gutenberg and Meta Box
- How to disable Gutenberg without using plugins
Also published on Medium.