Created
March 6, 2019 19:59
-
-
Save pingram3541/76b38076107c267f1126d068365c2568 to your computer and use it in GitHub Desktop.
Override parent theme script file w/ modified child theme version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Override the parent theme misc.js script. | |
* | |
* fix for Elementor popup forms due to | |
* issue w/ Bold Themes Medicare theme | |
*/ | |
function boldtheme_deregister_script() { | |
if( is_page( array( 'mypage', 'myotherpage' ) ) ){ | |
wp_deregister_script( 'boldthemes_misc_js' ); | |
wp_register_script( 'boldthemes_misc_js', get_stylesheet_directory_uri() . '/scripts/misc.js', array( 'jquery' ), null, false ); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'boldtheme_deregister_script', 11 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment