Advertisement
iEmanuele

How to include a js file in WP

Feb 12th, 2014
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.20 KB | None | 0 0
  1. add_action( 'wp_enqueue_scripts', 'theme_script' );
  2. function theme_script() {
  3.     wp_enqueue_script( 'theme-script', get_template_directory_uri() . '/js/theme-scripts.js', array('jquery'), '', true );
  4. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement