Created
April 18, 2014 11:59
-
-
Save markgoodyear/11040290 to your computer and use it in GitHub Desktop.
Enqueue 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
<?php | |
// All scripts to load here | |
function load_scripts() { | |
// Register script | |
wp_register_script('scrollup', get_template_directory_uri() . '/path/to/scripts/jquery.scrollUp.min.js', array('jquery'), '2.3.3', true ); | |
// Enqueue it | |
wp_enqueue_script('scrollup'); | |
} | |
// Add action to load scripts enqued in load_scripts() function | |
add_action('wp_enqueue_scripts', 'load_scripts'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment