Forked from someguy9/wp-remove-gutenberg-block-library-css.php
Created
August 24, 2022 22:55
-
-
Save zagriyen/e7dbd109abd06b31e366c342fc89d05b 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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