Created
February 28, 2019 10:44
-
-
Save incidunt/f08e635650d38db40881464fa04e3a83 to your computer and use it in GitHub Desktop.
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
/** Remove jQuery scripts loading from header */ | |
add_action('wp_enqueue_scripts', 'genesis_sample_script_remove_header'); | |
function genesis_sample_script_remove_header() { | |
wp_deregister_script( 'jquery' ); | |
wp_deregister_script( 'jquery-migrate' ); | |
} | |
/** Load jQuery script just before closing Body tag */ | |
add_action('genesis_after_footer', 'genesis_sample_script_add_body'); | |
function genesis_sample_script_add_body() { | |
wp_register_script( 'jquery', 'https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js', array(), null, true ); | |
wp_enqueue_script( 'jquery'); | |
wp_register_script( 'jquery-migrate', 'https://cdn.bootcss.com/jquery-migrate/3.0.1/jquery-migrate.min.js', array(), null, true ); | |
wp_enqueue_script( 'jquery-migrate'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment