Created
January 24, 2016 22:09
-
-
Save MuseMetrics/b618ce190345787d33ff to your computer and use it in GitHub Desktop.
(Genesis WordPress) Enqueueing Extraneous Scripts and Styles
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
/* | |
Depending on the theme that is being used, you may or may | |
not need to create your own custom function, but rather | |
simply copy and paste the nested functions and coordinate | |
the files with the proper directories. | |
*/ | |
/*Enqueue scripts and styles*/ | |
add_action( 'wp_enqueue_scripts', 'mm_enqueue_scripts_styles' ); | |
function mm_enqueue_scripts_styles() { | |
wp_enqueue_script( 'global-script', get_bloginfo( 'stylesheet_directory' ) . '/js/global.js', array( 'jquery' ), '1.0.0' ); | |
wp_enqueue_script( 'localScroll', get_stylesheet_directory_uri() . '/js/jquery.localScroll.min.js', array( 'scrollTo' ), '1.2.8b', true ); | |
wp_enqueue_script( 'scrollTo', get_stylesheet_directory_uri() . '/js/jquery.scrollTo.min.js', array( 'jquery' ), '1.4.5-beta', true ); | |
wp_enqueue_script('animation', get_bloginfo( 'stylesheet_directory' ) . '/js/jquery.animation.min.js', array( 'jquery' ), '1.0.0', true ); | |
wp_enqueue_script('super', get_bloginfo( 'stylesheet_directory' ) . '/js/jquery.super.min.js', array( 'jquery' ), '1.0.0', true ); | |
wp_enqueue_script('app', get_bloginfo( 'stylesheet_directory' ) . '/js/app.js', array( 'jquery' ), '1.0.0', true ); | |
wp_enqueue_style( 'dashicons' ); | |
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Playfair+Display|Felipa', array(), CHILD_THEME_VERSION ); | |
wp_enqueue_style( 'custom', get_bloginfo( 'stylesheet_directory' ) . '/css/custom.css' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment