Skip to content

Instantly share code, notes, and snippets.

@talentedaamer
Last active November 26, 2015 05:28
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 talentedaamer/8813f7031877be14836e to your computer and use it in GitHub Desktop.
Save talentedaamer/8813f7031877be14836e to your computer and use it in GitHub Desktop.
enqueue isotope js and custom js functions file.
<?php
/**
* Theme Directories & Paths
* ===================================
*/
if (!defined('FRAMEWORK_DIR'))
define('FRAMEWORK_DIR', trailingslashit(get_template_directory()));
if (!defined('FRAMEWORK_URI'))
define('FRAMEWORK_URI', trailingslashit(get_template_directory_uri()));
define('INC_DIR', trailingslashit( FRAMEWORK_DIR . 'inc'));
define('ASSETS_URI', trailingslashit( FRAMEWORK_URI . 'assets'));
/**
* Enqueue scripts and styles.
*/
function sperry_scripts() {
// isotopes js
wp_enqueue_script( 'isotope-js', ASSETS_URI . 'js/jquery.isotope.min.js', array('jquery'), null, true );
// custom functions
wp_enqueue_script( 'custom-functions', ASSETS_URI . 'js/custom-functions.js', array('jquery'), null, true );
}
add_action( 'wp_enqueue_scripts', 'sperry_scripts' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment