• Hi guys, I need to load cyclone slider (style and javascript) only in the home, I’m using the deregister function, but nothing happens

    any idea?
    sorry for my english and thanks for the great plugin!

    add_action( 'wp_print_scripts', 'deregister_cyclone_javascript', 100 );
    function deregister_cyclone_javascript() {
        if ( !is_home() ) {
            wp_deregister_script( 'cyclone_slider' );
        }
    }
    add_action( 'wp_print_styles', 'deregister_cyclone_styles', 100 );
    function deregister_cyclone_styles() {
        if ( !is_home() ) {
            wp_deregister_style( 'cyclone_slider' );
        }
    }

    http://wordpress.org/plugins/cyclone-slider-2/

The topic ‘Load style and javascript only home page’ is closed to new replies.