Last active
November 26, 2015 05:28
-
-
Save talentedaamer/8813f7031877be14836e to your computer and use it in GitHub Desktop.
enqueue isotope js and custom js functions file.
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 | |
/** | |
* 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