Home › Forums › Gutenberg › ACF Blocks – Prevent Style load in Frontend? › Reply To: ACF Blocks – Prevent Style load in Frontend?
How about unload it with wp_dequeue_style?
The second option is to make it with wp_deregister_style.
if( ! is_admin() ) {
add_action( 'wp_enqueue_scripts', 'my_dequeue_style', 11 );
function my_dequeue_style() {
wp_dequeue_style( 'my-handle' ); // the handle of style of the block
}
}
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.