Load Block Styles Only for Blocks on the Page
Replaces the single large block stylesheet with small per-block styles that load only when a block is actually used, which helps classic themes most.
Opens WPIDE on
Code
add_filter( 'should_load_separate_core_block_assets', '__return_true' );
Notes
Block themes already do this; on classic themes, check pages with widgets or page builders afterwards.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.