Last active
April 20, 2016 13:59
-
-
Save mrfoxtalbot/ba5996ea2dc9ecb6391740dc3271239d to your computer and use it in GitHub Desktop.
Enque javascript in WordPress
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
function my_assets() { | |
wp_enqueue_script( 'myscriptid', get_stylesheet_directory_uri() . 'js/myscripts.js', array( 'jquery' ) ); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_assets' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment