Skip to content

Instantly share code, notes, and snippets.

@jonbellah
Created January 21, 2013 13:06
Show Gist options
  • Save jonbellah/4585901 to your computer and use it in GitHub Desktop.
Save jonbellah/4585901 to your computer and use it in GitHub Desktop.
WP Enqueue Script at the bottom of the page with Genesis Framework
/** 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