Site logo

Archived topic

How to remove style-123.css from the Dev template?

1 reply · Started by Arp on November 25, 2020

Viewing posts 1–2 of 2

I know it's for GB but it's overriding changes in the customizer and I don't want to resort to !important for colors & such. I'm guessing I can create new GB blocks that won't be subject to the css file but I don't want unused css either.

Hi,

Try this PHP snippet.

add_action( 'wp_enqueue_scripts', 'remove_generateblocks_css', 100 );
function remove_generateblocks_css() {
wp_dequeue_style( 'generateblocks' );
}

This removes the <link rel="stylesheet" id="generateblocks-css" href="//yoursite.domain/wp-content/uploads/generateblocks/style-123.css?ver=1606345434" media="all"> the plugins adds.

As for the <style> it generates. I'm afraid there's no way of removing it without editing the plugin.

See this line: https://github.com/tomusborne/generateblocks/blob/bd7c9f3690c8e50d109602952a42a1d2417d3528/includes/class-enqueue-css.php#L130

This archived topic is closed to new replies.