Title: Dequeue styles unless is_single
Last modified: January 9, 2019

---

# Dequeue styles unless is_single

 *  Resolved [Will Stocks](https://wordpress.org/support/users/willstockstech/)
 * (@willstockstech)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/dequeue-styles-unless-is_single/)
 * Hi guys
    The ytprefs.min.css (and various other files) all load on every single
   page – regardless of whether there’s a video or not. I’ve tried to dequeue via
   the following:
 *     ```
       if( ! is_single()  ) {
       	wp_dequeue_script('__ytprefs__');
       	wp_dequeue_script('__ytprefsfitvids__');
       	wp_dequeue_style('__EPYT__style');
       	wp_dequeue_style('epytgb-style-css');
       }
       ```
   
 * but have so far had no luck – the stuff still loads on every single page.
 * Appreciate they’re lightweight, but still – is it possible?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [embedplus](https://wordpress.org/support/users/embedplus/)
 * (@embedplus)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/dequeue-styles-unless-is_single/#post-11071155)
 * Plugins like these might help you accomplish things like that where/when you 
   want: [https://wordpress.org/plugins/plugin-organizer/](https://wordpress.org/plugins/plugin-organizer/)
   
   or [https://wordpress.org/plugins/wp-asset-clean-up/](https://wordpress.org/plugins/wp-asset-clean-up/)
 * _[ [Signature deleted](https://wordpress.org/support/guidelines/#do-not-spam)]_
    -  This reply was modified 6 years, 8 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
 *  Thread Starter [Will Stocks](https://wordpress.org/support/users/willstockstech/)
 * (@willstockstech)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/dequeue-styles-unless-is_single/#post-11072217)
 * Thanks guys – I was kind of hoping to avoid having yet another plugin though 
   🙁

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Dequeue styles unless is_single’ is closed to new replies.

 * ![](https://ps.w.org/youtube-embed-plus/assets/icon-256x256.png?rev=2165403)
 * [Embed Plus for YouTube Gallery, Livestream and Lazy Loading with Facades](https://wordpress.org/plugins/youtube-embed-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/youtube-embed-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/youtube-embed-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/youtube-embed-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/youtube-embed-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/youtube-embed-plus/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Will Stocks](https://wordpress.org/support/users/willstockstech/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/dequeue-styles-unless-is_single/#post-11072217)
 * Status: resolved