• Resolved Will Stocks

    (@willstockstech)


    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)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dequeue styles unless is_single’ is closed to new replies.