Created
April 27, 2012 16:43
-
-
Save raideus/2510677 to your computer and use it in GitHub Desktop.
Example of using wp_enqueue_scripts() in WordPress
This file contains hidden or 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 | |
// Create a function to enqueue our scripts | |
function add_my_scripts() { | |
// Enqueue the modernizr script file and specify that it should be placed in the <head> | |
wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/libs/modernizr-2.5.3.min.js', array(), '2.5.2', false ); | |
} | |
// Run this function during the wp_enqueue_scripts action | |
add_action('wp_enqueue_scripts', 'add_my_scripts'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment