Home › Forums › Front-end Issues › Style loading even if block not used. › Reply To: Style loading even if block not used.
Above solution works for me too. Thanks.
Just make sure to use wp_register_style
for all styles.
Do not add the style names to register_block_type
, instead put style
in the block.json.
ps: I had to opt-in the following
block-styles-loading-enhancements-in-wordpress-5-8/
add_filter( 'should_load_separate_core_block_assets', '__return_true' );
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.