Skip to content

Instantly share code, notes, and snippets.

@joedooley
Created November 1, 2015 01:59
Show Gist options
  • Save joedooley/784cb76ad4078fca0b07 to your computer and use it in GitHub Desktop.
Save joedooley/784cb76ad4078fca0b07 to your computer and use it in GitHub Desktop.
Enqueue Slick Carosuel
<?php
//* Enqueue scripts and styles for Slick Slider
add_action( 'wp_enqueue_scripts', 'choosy_slick_slider_enqueue_scripts' );
function choosy_slick_slider_enqueue_scripts() {
if( is_front_page() )
{
wp_enqueue_style( 'slick-css', get_stylesheet_directory_uri() . '/lib/css/slick.css', array(), CHILD_THEME_VERSION );
wp_enqueue_style( 'slick-theme-css', get_stylesheet_directory_uri() . '/lib/css/slick-theme.css', array(), CHILD_THEME_VERSION );
wp_enqueue_script( 'slick-js', get_stylesheet_directory_uri() . '/lib/js/slick.js', array( 'jquery' ), '1.5.3', true );
wp_enqueue_script( 'slick-init', get_stylesheet_directory_uri() . '/lib/js/slick-init.js', array( 'slick-js' ), '1.0.0', true );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment