Learn in this tutorial how to enable block styles to load separately in WordPress using code.
WordPress 5.8 introduces quite a few new features, including an improvement to how block styles are loaded.
Specifically, this enhancement allows only the styles of the blocks that are being used on the page to be loaded.
Until now, by default, the styles of all native WordPress blocks were loaded on all pages.
You can imagine that this is quite an interesting performance improvement, but to take advantage of it you have to activate it.
Snippet to enable independent loading of WordPress block styles
Add the following snippet to the functions.php file:
It’s as simple as that.
Now you know how to enable WordPress native block styles to load separately.
Thanks to this, the page will only load the styles of the blocks present on the page with the performance improvement that this entails.
Any questions? I read you in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉