Skip to content

Instantly share code, notes, and snippets.

@markgoodyear
Created April 18, 2014 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markgoodyear/11040290 to your computer and use it in GitHub Desktop.
Save markgoodyear/11040290 to your computer and use it in GitHub Desktop.
Enqueue WordPress
<?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