• 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.

Viewing 1 replies (of 1 total)
  • Plugin Author Josh Leuze

    (@jleuze)

    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' );
    
    	}
    
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Meteor Slides – Load CSS/Scripts only on Home Page’ is closed to new replies.