Created
February 20, 2012 01:28
-
-
Save wpbandit/1867033 to your computer and use it in GitHub Desktop.
WP Load JS
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
<?php | |
// Add action to enqueue scripts | |
add_action('wp_enqueue_scripts','theme_javascript'); | |
// Function to load theme javascript | |
function theme_javascript() { | |
// Register slider script | |
wp_register_script('slider',get_template_directory_uri().'js/jquery.slider.js',array('jquery'),'1.0'); | |
// Enqueue theme script | |
wp_enqueue_script('theme',get_template_directory_uri().'js/theme.js',array('jquery','slider'),'1.0'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment