Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Slick Slider
<?php
// Drop Slick Slider files inside of js folder and add the following to your functions.php
//Slick Slider JS
add_action('wp_enqueue_scripts', 'load_slick', 5);
function load_slick(){
// Slick Slider JS
wp_enqueue_script(
'slick',
get_stylesheet_directory_uri() . '/js/slick/slick.js',
array('jquery'),
false,
'all'
);
// Slick Slider JS
wp_enqueue_script(
'slick-init',
get_stylesheet_directory_uri() . '/js/slick/slick-init.js',
array('jquery'),
false,
'all'
);
wp_enqueue_style(
'slick',
get_template_directory_uri() . '/js/slick/slick.css'
);
wp_enqueue_style(
'slick-theme',
get_template_directory_uri() . '/js/slick/slick-theme.css'
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment