Skip to content

Instantly share code, notes, and snippets.

@flymke
Created November 6, 2020 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flymke/f7034c79187eac051efafdba02847e15 to your computer and use it in GitHub Desktop.
Save flymke/f7034c79187eac051efafdba02847e15 to your computer and use it in GitHub Desktop.
SantaPress: How to disable bootstrap-modal in Avada
/* disable bootstrap-modal in Avada globally */
add_action( 'wp_enqueue_scripts', 'custom_disable_theme_js' );
function custom_disable_theme_js() {
Fusion_Dynamic_JS::deregister_script('bootstrap-modal');
}
/* disable bootstrap-modal in Avada only on certain pages */
add_action( 'wp_enqueue_scripts', 'custom_disable_theme_js' );
function custom_disable_theme_js() {
global $post;
if($post->ID == 123) // your page id where santapress is loaded
Fusion_Dynamic_JS::deregister_script('bootstrap-modal');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment