Title: dequeue css
Last modified: January 15, 2021

---

# dequeue css

 *  Resolved [mattgerrish](https://wordpress.org/support/users/mattgerrish/)
 * (@mattgerrish)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/)
 * Hi,
 * I like to dequeue the plugin styles as I don’t need 3 stylesheets called.
 * I’ve tried the following in functions.php but it doesn’t work:
 * add_action(‘wp_enqueue_scripts’, ‘dequeue_glossary_plugin_style’, 100);
    function
   dequeue_glossary_plugin_style(){ wp_dequeue_style(‘glossary-general-css’); wp_dequeue_style(‘
   glossary-hint-css’); wp_dequeue_style(‘glossary-mobile-tooltip-css’); }
 * Any pointers much appreciated.
 * Thanks,
    Matt

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/dequeue-css-2/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/dequeue-css-2/page/2/?output_format=md)

 *  Plugin Author [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * (@mte90)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13911274)
 * You don’t need the suffix `-css` as this is added by wordpress itself, also our
   priority is 9999 for those files so you need for the filter a value more high
   then `100` as your snippet.
 *  Thread Starter [mattgerrish](https://wordpress.org/support/users/mattgerrish/)
 * (@mattgerrish)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13911398)
 * Hi Daniele, thanks for your response.
 * So what would the actual snippet be then? I’m used to just dequeueing shortcodes…
 *  Plugin Author [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * (@mte90)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13911429)
 *     ```
       add_action(‘wp_enqueue_scripts’, ‘dequeue_glossary_plugin_style’, 99999);
       function dequeue_glossary_plugin_style(){
       wp_dequeue_style(‘glossary-general’);
       wp_dequeue_style(‘glossary-hint’);
       wp_dequeue_style(‘glossary-mobile-tooltip’);
       }
       ```
   
 * This should be enough to dequeue those files. Anyway the mobile-tooltip is a 
   premium feature so you are a premium user and you cloud use [https://support.codeat.co](https://support.codeat.co)
   but this file is added by an option in the settings so if you don’t need you 
   can disable it.
 * The general is for the widgets and hint is for the tooltip itself. If you are
   not using the tooltip mode for links it won’t be added in your page.
 * I think that I can implement an internal check to not load general css if there
   are no glossary widget in use.
 *  Thread Starter [mattgerrish](https://wordpress.org/support/users/mattgerrish/)
 * (@mattgerrish)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13911532)
 * Hi Daniele,
    That’s great, thank you.
 * The only css file that is still showing is ‘glossary-general-css’.
 * How do I dequeue that as well?
 * We would prefer to minimize the css requests if possible.
 * Thanks,
    Matt
 *  Plugin Author [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * (@mte90)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13911540)
 * The next release I will do next week will not enqueue that file in the page if
   there are no Glossary widgets. I already started working on that.
 *  Thread Starter [mattgerrish](https://wordpress.org/support/users/mattgerrish/)
 * (@mattgerrish)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13911568)
 * Ok lovely thanks for that Daniele. Love your plugin, keep up the good work 🙂
 *  Plugin Author [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * (@mte90)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13912012)
 * I am releasing now the version with that enhancement, so just check on your wordpress
   dashboard in the next hours for an update.
 *  Thread Starter [mattgerrish](https://wordpress.org/support/users/mattgerrish/)
 * (@mattgerrish)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13929627)
 * Hi Daniele,
    Did you release the enhancement? If so, how do I dequeue the general
   css file? I tried this, but it doesn’t work: wp_dequeue_style(‘glossary-general’’);
   Thanks, Matt
 *  Plugin Author [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * (@mte90)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13932573)
 * Yes the latest release has the code to not inject that file if the widget are
   not used.
 *  Thread Starter [mattgerrish](https://wordpress.org/support/users/mattgerrish/)
 * (@mattgerrish)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13933203)
 * Is that 2.0.10?
 *  Thread Starter [mattgerrish](https://wordpress.org/support/users/mattgerrish/)
 * (@mattgerrish)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13933215)
 * where can I download the latest release?
 *  Plugin Author [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * (@mte90)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13933442)
 * You can download/update it from the wordpress dashboard as you have installed
   the plugin inside.
 *  Thread Starter [mattgerrish](https://wordpress.org/support/users/mattgerrish/)
 * (@mattgerrish)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13933466)
 * it might be because i have the premium plugin.. it doesnt show an update available
 *  Plugin Author [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * (@mte90)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13933497)
 * That version is available also for premium users. Can you check the version that
   you have installed in the plugin page of your wordpress backend?
 *  Thread Starter [mattgerrish](https://wordpress.org/support/users/mattgerrish/)
 * (@mattgerrish)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/#post-13933560)
 * 2.0.10 – there is no option to update

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/dequeue-css-2/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/dequeue-css-2/page/2/?output_format=md)

The topic ‘dequeue css’ is closed to new replies.

 * ![](https://ps.w.org/glossary-by-codeat/assets/icon-256x256.png?rev=1889092)
 * [Glossary](https://wordpress.org/plugins/glossary-by-codeat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/glossary-by-codeat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/glossary-by-codeat/)
 * [Active Topics](https://wordpress.org/support/plugin/glossary-by-codeat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/glossary-by-codeat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/glossary-by-codeat/reviews/)

 * 18 replies
 * 2 participants
 * Last reply from: [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/dequeue-css-2/page/2/#post-13933662)
 * Status: resolved