Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(function($) {
- // your code
- });
- wp_register_script (
- 'yourscripthandle', //string $handle: a string to identify this script
- get_bloginfo( 'template_url' ) . '/js/yourcustomjs.js', //string $src: Path of your script file
- array ('jquery' ), // array $deps = array(): defining which scripts your script is dependend on. In your case, it's jQuery.
- '', // string|bool $ver = false: The version of your Script
- true //bool $in_footer = false: whether your script should be enqueued in `wp_head()` or `wp_footer()`
- );
- wp_enqueue_script( 'yourscripthandle' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement