Replies: 0
Hello,
It looks like MasterSlider is loading CSS Files across all pages. This is despite the “Load assets on all pages?” option being turned OFF.
The two lines in the header on ALL pages;
<link rel='stylesheet' id='msl-main-css' href='http://mysite/wp-content/plugins/master-slider/public/assets/css/masterslider.main.css?ver=2.9.7' type='text/css' media='all' />
<link rel='stylesheet' id='msl-custom-css' href='http://mysite/files/master-slider/custom.css?ver=2.1' type='text/css' media='all' />
I have a function below but i’m not sure how to actually target these two css files from being queued?
function my_deregister_javascript() {
if ( ! is_front_page() ) {
wp_dequeue_style('css file one');
wp_dequeue_style('css file two');
}
}
add_action( 'wp_print_scripts', 'my_deregister_javascript');
Thanks!
- This topic was modified 6 minutes ago by brandontvc.