contacts

(+359) 88 339 4445

Buy All 39 Premium WordPress Themes for $54.99

How to Remove Gutenberg Block Library Style CSS

How to Remove Gutenberg Block Library Style CSS

The new WordPress editor (Gutenberg) brings new functionality for editing content but it comes with additional resources which are loaded on every site page load.

In case you don’t use Gutenberg i.e. you still use Classic editor or plugin page builder you can optimize page load by disable loading of Gutenberg block library style.min.css file.

Here is how it can be done:

1. Login to your Admin Panel

2. Navigate to Left Menu -> Appearance -> Theme Editor

3. Open functions.php for edit

4. Insert the following code:

function remove_gutenberg_blocks_style_css() {
   wp_dequeue_style( 'wp-block-library-theme' );
   wp_dequeue_style( 'wc-block-style' );
   wp_dequeue_style( 'storefront-gutenberg-blocks' );
   wp_dequeue_style( 'wp-block-library' );
}

add_action( 'wp_enqueue_scripts', 'remove_gutenberg_blocks_style_css', 99 );

Leave a Reply