Dequeue a style file which is making website load slow!


I have a website running on GrandNews WordPress Theme ( and loading via KeyCDN. The site is loading a CSS file located at which is of 0KB size and not in use. This file “kirki-styles.css” is making website load slow as you can see here: and CDN support suggested me to dequeue the stylesheet in a child theme functions.php file which I tried to but somehow it’s not working and server still try to load file and gives 504 error.

Maybe something wrong with my code. So far I have followed these steps:

  1. Created a Child Theme and tested it… It’s working.
  2. Tried following pieces of code to try to make it to work
    (Nothing extra)

     add_action('wp_enqueue_scripts', 'kirki_style_remove', 100);
        function kirki_style_remove()

    Tried this way once as well:

    function wp_dequeue_kirki_style()
        wp_dequeue_style('kirki-styles', '');
        // wp_deregister_style('kirki-styles');
    add_action('wp_enqueue_scripts', 'wp_dequeue_kirki_style', '999');

Apart from these two codes above, I also tried a plugin but that didn’t work as well.

Please advise with the most efficient solution. Thanks in advance!

, , , Sheryl 2 years 2020-01-16T08:38:23-05:00 0 Answers 101 views 0

Leave an answer