Deregister script and css file that is registered by Visual Composer from a theme

An example how to deactivate the whole Flexslider, Nivoslider and Owl Carousel sliders in the Visual Composer plugin.

add_action( 'wp_enqueue_scripts', 'remove_vc_modules', 99 );
function remove_vc_modules() {
	wp_deregister_style( 'flexslider' );
	wp_deregister_script( 'flexslider' );

	wp_deregister_style( 'nivo-slider-css' );
	wp_deregister_style( 'nivo-slider-theme' );
	wp_deregister_script( 'nivo-slider' );

	wp_deregister_style( 'owl-carousel' );
	wp_deregister_script( 'owl-carousel' );
}

Leave a Reply

Your email address will not be published. Required fields are marked *