[solved] How to remove Gutenberg styles from frontend?
I have Gutenberg plugin installed in WordPress and am trying to remove the CSS:
<link rel='stylesheet' id='wp-block-library-css' href='http://site.loc/wp-includes/css/dist/block-library/style.min.css' type='text/css' media='all' /> <link rel='stylesheet' id='wp-components-css' href='http://site.loc/wp-includes/css/dist/components/style.min.css' type='text/css' media='all' /> <link rel='stylesheet' id='wc-block-style-css' href='http://site.loc/wp-content/plugins/woo-gutenberg-products-block/build/style.css' type='text/css' media='all' />
I am use this code to to remove default style.
function my_deregister_styles_and_scripts() { wp_dequeue_style('wp-block-library'); wp_dequeue_style('wc-block-style'); } add_action( 'wp_print_styles', 'my_deregister_styles_and_scripts', 100 );