Skip to content

Instantly share code, notes, and snippets.

@someguy9
Last active November 21, 2023 08:00
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save someguy9/1f51a7cb3349cc32d00f5aaa5d3b3e19 to your computer and use it in GitHub Desktop.
Removed the "/wp-includes/css/dist/block-library/style.min.css" file from your WordPress site
<?php
//Remove Gutenberg Block Library CSS from loading on the frontend
function smartwp_remove_wp_block_library_css(){
wp_dequeue_style( 'wp-block-library' );
wp_dequeue_style( 'wp-block-library-theme' );
wp_dequeue_style( 'wc-blocks-style' ); // Remove WooCommerce block CSS
}
add_action( 'wp_enqueue_scripts', 'smartwp_remove_wp_block_library_css', 100 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment