Skip to content

Instantly share code, notes, and snippets.

@reediredale
Created June 28, 2012 02:28
Show Gist options
  • Save reediredale/3008381 to your computer and use it in GitHub Desktop.
Save reediredale/3008381 to your computer and use it in GitHub Desktop.
Register WP Theme Scripts
// Register our Scripts
function register_js() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
wp_register_script('quicksand', get_template_directory_uri() . '/js/jquery.quicksand.js', 'jquery');
wp_register_script('easing', get_template_directory_uri() . '/js/jquery.easing.1.3.js', 'jquery');
wp_register_script('custom', get_template_directory_uri() . '/js/jquery.custom.js', 'jquery', '1.0', TRUE);
wp_register_script('prettyPhoto', get_template_directory_uri() . '/js/jquery.prettyPhoto.js', 'jquery');
wp_enqueue_script('jquery');
wp_enqueue_script('quicksand');
wp_enqueue_script('prettyPhoto');
wp_enqueue_script('easing');
wp_enqueue_script('custom');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment