Logo

dev-resources.site

for different kinds of informations.

2 easy ways disable Gutenberg editor in WordPress

Published at
5/12/2024
Categories
wordpress
gutenberg
plugins
webdev
Author
almazbisenbaev
Author
14 person written this
almazbisenbaev
open
2 easy ways disable Gutenberg editor in WordPress

Gutenberg, the new editor that was introduced into WordPress since version 5.0 has a lot of cool features. But it in some cases, when you don’t actually need it, it still bloats your website with unused CSS and JS.

Here are the two easy ways to disable Gutenberg:

By pasting this PHP code into your functions.php:

// Disable Gutenberg on the back end
add_filter( 'use_block_editor_for_post', '__return_false' );

// Disable Gutenberg for widgets
add_filter( 'use_widgets_block_editor', '__return_false' );

add_action( 'wp_enqueue_scripts', function() {

    // Remove CSS on the front end
    wp_dequeue_style( 'wp-block-library' );

    // Remove Gutenberg theme
    wp_dequeue_style( 'wp-block-library-theme' );

    // Remove inline global CSS on the front end
    wp_dequeue_style( 'global-styles' );

    // Remove classic-themes CSS for backwards compatibility for button blocks
    wp_dequeue_style( 'classic-theme-styles' );

}, 20 );
Enter fullscreen mode Exit fullscreen mode

Using PowerTools

PowerTools is a free WordPress plugin that is aimed to improve your productivity by solving some of the tasks that you encounter when building a website. I created it for myself and published the souce code on GitHub.

It allows you to disable Gutenberg just by ticking one checkbox:

Gutenberg Disabler tool in PowerTools

All you need to do is download the plugin from GitHub, install it and find Gutenberg Disabler in the list of the tools that the plugin features.

It’s that easy!

gutenberg Article's
30 articles in total
Favicon
WordPress Data Views: Basic setup
Favicon
A Beginner’s Guide to Global State Management in WordPress Gutenberg
Favicon
Comparing the Drupal and WordPress Implementations of Gutenberg themes, blocks, and more!
Favicon
WordPress Interactivity API: Detailed Explanation
Favicon
2 easy ways disable Gutenberg editor in WordPress
Favicon
WooCommerce Checkout Blocks
Favicon
MaxiBlocks
Favicon
How to create Gutenberg blocks using Advanced Custom Fields in WordPress
Favicon
Gutenberg vs Elementor
Favicon
How and Why to Build Custom Gutenberg Blocks in WordPress
Favicon
How to register custom Gutenberg Block Category
Favicon
Creating Gutenberg Blocks with Advanced Custom Fields (ACF) and LazyBlocks: A Comparative Guide
Favicon
Gutenberg Block to retrieve GitHub public repositories (and enhance a portfolio)
Favicon
Update Content for a Custom Block Toolbar Button (Full Site Editing)
Favicon
How to Create a Product Page - P5 - Using Meta Box and Gutenberg
Favicon
Introducing Theme Redone - the modern WordPress Starter Theme
Favicon
Embed privacy: Free 2-click-privacy plugin for YouTube and Twitter
Favicon
Gutenberg 13.0 och förbättringar i Wordpress 6.0
Favicon
How to Display Images from Cloneable Fields - P1 - with Gutenberg
Favicon
Gutenberg cheatsheet – Block's `supports` property
Favicon
Gutenberg – Block Deprecation
Favicon
Why Gutenberg is killing Wordpress
Favicon
How Symfony Station was built: an adventurous exploration of layout solutions
Favicon
Full Site Editing - P5: What Are Block Patterns in Gutenberg? How to Create Them?
Favicon
Review Quadrat - A WordPress Block Theme
Favicon
The Future of WordPress Themes in 5.8 and Beyond.
Favicon
Full Site Editing (FSE) - All You Need To Know - P1 - Overview
Favicon
Gutenberg vs. Page Builders - What is Better & Faster? In-depth Comparison
Favicon
Gutenberg Full Width Editor with Blocks Border Plugin
Favicon
Create a Custom Gutenberg Block Plugin with Underpin

Featured ones: