If you don’t use the new WordPress blocks, you should avoid loading the block-style CSS on your page to optimize the page load speed. Here are the three lines you need:

add_action('wp_print_styles', function () {
  wp_dequeue_style('wp-block-library');
  wp_dequeue_style('wp-block-library-theme');
}, 100);

Adding the action with priority 100, it will be executed after the style has been enqueued by WordPress.

You can add this code in your functions.php theme file.

Similar Posts

Leave a Reply