[How To] Remove Block Library CSS from WordPress
Gutenberg, the default editor for the latest WordPress installations, uses special CSS libraries to manage blocks on your front end. If you are using this new WP editor, it will automatically add this library CSS code on your site;
<link rel='stylesheet' id='wp-block-library-css' href='https://st.wpassist.me/wp-includes/css/dist/block-library/style.min.css' type='text/css' media='all' />
But, if you are not using Gutenberg blocks in any way, you can use the following snippet to remove this extra stylesheet from your theme;
function wpassist_remove_block_library_css(){ wp_dequeue_style( 'wp-block-library' ); } add_action( 'wp_enqueue_scripts', 'wpassist_remove_block_library_css' );
I know this is only one less request on your server, but if you are aiming for 5000 users a day, it is 150k fewer requests a month 🙂
If you love building up with WordPress, you will love our plugins, too. Check them out here!
Deal Notice: We are using A2 hosting for all of our websites, and we are really happy with their service. So we wanted to share you this discount link for you to try it out. If you get a hosting using this link, you will also help us build better content for you: SSD Hosting - 300% Faster Than Standard Hard Drives