WordPress’s Gutenberg Editor: A Disabling Guide
The Gutenberg editor has been part of the WordPress core since its release in version 5.0. While it offers a more intuitive, block-based approach to content creation, not every WordPress user has warmed up to its interface. Some find its performance unsatisfactory, or simply prefer the traditional classic editor for their content endeavors. If you’re in this camp, there are multiple methods to completely disable the Gutenberg editor and restore the Classic Editor interface. Here’s how you can seamlessly achieve this.
1. Install the Classic Editor Plugin
The easiest and most straightforward method to disable the Gutenberg Editor is by installing the Classic Editor Plugin. This popular plugin is maintained by the WordPress team, ensuring compatibility and security.
Steps:
- Navigate to your WordPress dashboard.
- Go to ‘Plugins’, then ‘Add New’.
- Search for “Classic Editor”.
- Install and activate the plugin.
- Once activated, go to ‘Settings’ then ‘Writing’.
- Here, select “Classic editor” as the default editor for all users.
- You can also allow users to switch between Gutenberg and Classic Editor if desired.
This plugin takes over and completely disables the Gutenberg editor, offering a seamless transition back to the Classic interface.
2. Use the Disable Gutenberg Plugin
For those who seek not only to reinstate the Classic Editor but also to have fine-tuned control over its application across different user roles or post types, the Disable Gutenberg plugin is ideal.
Steps:
- Head to the ‘Add New’ section under ‘Plugins’ on your dashboard.
- Search for “Disable Gutenberg”.
- Install and activate the plugin.
- In the settings, you can choose to disable Gutenberg completely or selectively based on user roles and post types.
This method is beneficial for websites where certain users may benefit from the block editor while others prefer the classic approach.
3. Manually Disable Gutenberg With Code
If you prefer not to use a plugin, you can also disable Gutenberg by adding code to your theme’s functions.php file. This approach is suited for those who have a good grasp of coding and want to avoid the use of additional plugins.
Code:
add_filter('use_block_editor_for_post_type', '__return_false', 10);
Adding this line to your functions.php file will turn off Gutenberg across all post types, reverting your editor to the Classic Editor.
4. Disable Only for Certain Custom Post Types
If your intention is not to disable Gutenberg editor globally but only for certain custom post types, the following approach lets you selectively choose where the classic editor will be used.
Code:
add_filter('use_block_editor_for_post_type', function($use_block_editor, $post_type) {
if ($post_type === 'your_custom_post_type') {
return false;
}
return $use_block_editor;
}, 10, 2);
Replace ‘your_custom_post_type’ with the relevant post type identifier. This code checks the post type and disables Gutenberg where specified while leaving it enabled for others.
5. Adjust Through Theme Support
Developers can also integrate support for disabling Gutenberg right into their themes. If you’re developing a theme and know that the target audience might prefer the classic editor, this is an especially proactive approach.
Code:
add_action('after_setup_theme', 'remove_gutenberg');
function remove_gutenberg() {
remove_theme_support('core-block-patterns');
}
By inserting this function into your theme’s functions.php file, you deny support for Gutenberg’s block patterns, implicitly promoting the Classic Editor’s use.
Considerations Before Disabling Gutenberg
Before finalizing the disablement of Gutenberg, consider the long-term implications:
- Plugin Compatibility: As WordPress continues to evolve, plugin developers may focus more on Gutenberg compatibility.
- Future WordPress Releases: Gutenberg is set to be the future of WordPress. Completely distancing your operations from Gutenberg might require additional adjustments with each major WordPress update.
- User Experience: Consider the preference and flexibility of your users. Providing options can sometimes be more beneficial than a complete revert.
By aligning your selection of methods with your specific needs, you can effectively disable the Gutenberg editor from your WordPress environment, ensuring a content creation experience tailored to your preferences.
Leave a Reply