Created
November 18, 2011 19:23
-
-
Save daltonrooney/1377486 to your computer and use it in GitHub Desktop.
Proper way to load WordPress scripts (should be in functions.php)
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 | |
function xx_load_scripts() { | |
wp_enqueue_script( 'jquery' ); | |
wp_register_script( 'cycle', plugins_url( 'js/jquery.cycle.all.min.js', dirname(__FILE__) ), false, '2.99', true ); | |
wp_enqueue_script( 'cycle' ); | |
} | |
add_action('wp_enqueue_scripts', 'xx_load_scripts'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment