[Support request] How to remove style-123.css from the Dev template?

Home Forums Support [Support request] How to remove style-123.css from the Dev template?

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1547564
    Arp

    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.

    #1547724
    Elvin
    Staff
    Customer Support

    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

    A wise man once said:
    "Have you cleared your cache?"

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.