Hello, I’m using Unite theme together with another third party plugin that creates modal windows and there is a conflict due to that plugin uses his own libraries. Is there a way to turn off using js for specific objects?
Thank you
Hello, I’m using Unite theme together with another third party plugin that creates modal windows and there is a conflict due to that plugin uses his own libraries. Is there a way to turn off using js for specific objects?
Thank you
Which plugin you are talking about?
Woocommerce Products Designer
Most likely your mentioned plugin is conflicting with Bootstrap JavaScript library. You can replace existing wp_enqueue_script
for Bootstrap library with some slightly more advanced code so it would load scripts only on some specific pages.
if ( is_page( array( 'my-blog', 'about-me', 'contact' ) ) ) {
// no scripts need to be loaded here or load whatever you want there.
} else {
// load usual Bootstrap script which has Modal windows built in
wp_enqueue_script('unite-bootstrapjs', get_template_directory_uri().'/inc/js/bootstrap.min.js', array('jquery') );
}
For more detailed instruction on how to use this function see WordPress documentation for is_page.
You can apply this for all scripts and CSS files if you like.