Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. jQuery(document).ready(function($) {
  2. // your code
  3. });
  4.  
  5. wp_register_script (
  6. 'yourscripthandle', //string $handle: a string to identify this script
  7. get_bloginfo( 'template_url' ) . '/js/yourcustomjs.js', //string $src: Path of your script file
  8. array ('jquery' ), // array $deps = array(): defining which scripts your script is dependend on. In your case, it's jQuery.
  9. '', // string|bool $ver = false: The version of your Script
  10. true //bool $in_footer = false: whether your script should be enqueued in `wp_head()` or `wp_footer()`
  11. );
  12.  
  13. wp_enqueue_script( 'yourscripthandle' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement