Skip to content

Instantly share code, notes, and snippets.

@dgmike
Created October 1, 2012 12:53
Show Gist options
  • Save dgmike/3811632 to your computer and use it in GitHub Desktop.
Save dgmike/3811632 to your computer and use it in GitHub Desktop.
WordPress Functions: Register theme scripts
/*
Add scripts to the WordPress loader cue
*/
function px_theme_scripts() {
if(!is_admin()) :
$js_path = get_template_directory_uri().'/inc/js/';
wp_deregister_script('jquery');
wp_register_script('jquery', $js_path.'scripts/jquery.latest.js');
wp_enqueue_script('jquery');
endif;
}
add_action('init', 'px_theme_scripts');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment