hello,
I use meteor slides only on my home page. I want to know if there is any way to disable css/js/javascript related to this plugin in header from other pages except home page - where it's being displayed on.
Thank you.
hello,
I use meteor slides only on my home page. I want to know if there is any way to disable css/js/javascript related to this plugin in header from other pages except home page - where it's being displayed on.
Thank you.
Hi, to do this you would specify what page you wanted to load it on and remove the actions from running on any other page.
Here is a bit of code you could drop into your theme's functions.php file to remove the scripts from all but the front page:
add_action( 'get_header', 'remove_meteorslides_scripts' );
function remove_meteorslides_scripts() {
if ( !is_front_page() ) {
remove_action( 'wp_print_scripts', 'meteorslides_javascript' );
remove_action( 'wp_enqueue_scripts', 'meteorslides_css' );
}
}You must log in to post.