Created
January 21, 2013 13:06
-
-
Save jonbellah/4585901 to your computer and use it in GitHub Desktop.
WP Enqueue Script at the bottom of the page with Genesis Framework
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 script loading from header */ | |
add_action('wp_enqueue_scripts', 'child_deregister_scripts'); | |
function child_deregister_scripts() { | |
wp_deregister_script( 'jquery' ); | |
wp_deregister_script( 'jquery-ui' ); | |
} | |
/** Load scripts before closing the body tag */ | |
add_action('genesis_after_footer', 'child_script_managment'); | |
function child_script_managment() { | |
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js' ); | |
wp_register_script( 'jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js' ); | |
wp_enqueue_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', array( 'jquery' ), '4.0', false ); | |
wp_enqueue_script( 'jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js', array( 'jquery' ), '1.9.2' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment