I have no idea why this was considered helpful, but WordPress core keeps adding more code junk into site pages, even when you aren’t using the WordPress block editor. I wrote a post about this in 2018, but even more junk has been added now.

In my original post, I made this statement, which was grossly incorrect:

This will not be a problem if/when Gutenberg is merged into WordPress core, because themes will be able to simply include support by default.

It turns out that this problem was not fixed before it was merged into core. I’m somewhat baffled by why this is the case, but it’s thankfully something which is fairly trivial to fix.


 * Disable WordPress block editor CSS.
function disable_gutenberg_junk() {
	wp_dequeue_style( 'wp-block-library' );
	wp_dequeue_style( 'wp-block-library-theme' );
	wp_dequeue_style( 'global-styles' );
	wp_dequeue_style( 'wc-block-style' );
add_action( 'wp_print_styles', 'disable_gutenberg_junk', 100 );

Updates to this, will be provided on the Remove WordPress block CSS page.