Want to create a beautiful image carousel in WordPress without installing another heavy slider plugin?

A custom Slick Slider is a great option when you want full control over your slider design, layout, speed, navigation arrows, dots, responsiveness, and dynamic content. Whether you want to display images, testimonials, blog posts, portfolio items, or WooCommerce products, Slick Slider gives you a flexible way to create smooth, mobile-friendly sliders inside your WordPress website.

In this guide, you’ll learn how to create a custom Slick Slider in WordPress without a plugin. We’ll cover the basic setup, how to enqueue Slick Slider files properly, how to add slider markup, how to make it responsive, how to create a shortcode, how to display dynamic WordPress posts, and how to fix common Slick Slider issues.

By the end, you’ll have a working custom slider that you can use inside your WordPress theme, template files, shortcode areas, Elementor pages, Gutenberg blocks, or WooCommerce sections.

What Is a Slick Slider in WordPress?

Slick Slider is a popular jQuery-based carousel library that lets you create responsive sliders, image carousels, content sliders, testimonial sliders, and product sliders.

In WordPress, Slick Slider is commonly used to create:

The main advantage of using Slick Slider in WordPress is flexibility. Instead of depending on a ready-made slider plugin, developers can control the HTML, CSS, JavaScript, and dynamic WordPress query.

Subscribe to our Newsletter

Stay updated with our latest news and offers.
Thanks for signing up!

Why Create a Custom Slick Slider Instead of Using a Plugin?

WordPress slider plugins are helpful, especially for beginners. But sometimes, a plugin may add too many extra features, scripts, or styling options that you do not need.

A custom Slick Slider is better when you want:

However, if you are not comfortable editing code, using a slider plugin may be easier. A custom Slick Slider is best for users who can work with WordPress theme files, shortcodes, and basic JavaScript.

Requirements Before You Start

Before creating a custom Slick Slider in WordPress, make sure you have:

Important note: Avoid editing your main parent theme directly. If the theme updates, your custom code may be removed. Always use a child theme or a site-specific custom plugin.

Step 1: Download Slick Slider Files

First, you need to add Slick Slider files to your WordPress theme.

Download Slick Slider and place the files inside your child theme like this:

your-child-theme/
│
├── assets/
│   ├── slick/
│   │   ├── slick.css
│   │   ├── slick-theme.css
│   │   └── slick.min.js
│   │
│   └── js/
│       └── slick-init.js

You can also use a CDN, but for better control, loading the files locally from your theme is usually better.

Step 2: Enqueue Slick Slider CSS and JS in WordPress

Now, you need to load the Slick Slider CSS and JavaScript files properly in WordPress.

Open your child theme’s functions.php file and add this code:

function codecanel_enqueue_slick_slider_assets() {

    // Slick Slider CSS
    wp_enqueue_style(
        'slick-css',
        get_stylesheet_directory_uri() . '/assets/slick/slick.css',
        array(),
        '1.8.1'
    );

    // Slick Slider Theme CSS
    wp_enqueue_style(
        'slick-theme-css',
        get_stylesheet_directory_uri() . '/assets/slick/slick-theme.css',
        array('slick-css'),
        '1.8.1'
    );

    // Slick Slider JS
    wp_enqueue_script(
        'slick-js',
        get_stylesheet_directory_uri() . '/assets/slick/slick.min.js',
        array('jquery'),
        '1.8.1',
        true
    );

    // Custom Slick Initialization JS
    wp_enqueue_script(
        'custom-slick-init',
        get_stylesheet_directory_uri() . '/assets/js/slick-init.js',
        array('jquery', 'slick-js'),
        '1.0.0',
        true
    );
}
add_action('wp_enqueue_scripts', 'codecanel_enqueue_slick_slider_assets');

This code loads the Slick Slider CSS, theme CSS, Slick JavaScript file, and your custom initialization file.

The array('jquery') dependency ensures that jQuery loads before Slick Slider. This is important because Slick Slider depends on jQuery.

Step 3: Add Basic Slick Slider HTML Markup

Next, add the slider HTML where you want the slider to appear.

You can place this code inside a WordPress template file such as:

Here is a basic image slider structure:

<div class="custom-slick-slider">
    <div class="slider-item">
        <img src="https://example.com/image-1.jpg" alt="WordPress custom slick slider image 1">
    </div>

    <div class="slider-item">
        <img src="https://example.com/image-2.jpg" alt="WordPress custom slick slider image 2">
    </div>

    <div class="slider-item">
        <img src="https://example.com/image-3.jpg" alt="WordPress custom slick slider image 3">
    </div>

    <div class="slider-item">
        <img src="https://example.com/image-4.jpg" alt="WordPress custom slick slider image 4">
    </div>
</div>

Replace the image URLs with your own image links from the WordPress Media Library.

Step 4: Initialize Slick Slider with jQuery

Now open your slick-init.js file and add this code:

jQuery(document).ready(function($) {
    $('.custom-slick-slider').slick({
        infinite: true,
        slidesToShow: 3,
        slidesToScroll: 1,
        dots: true,
        arrows: true,
        autoplay: true,
        autoplaySpeed: 3000,
        speed: 600,
        pauseOnHover: true
    });
});

This will activate the slider on any element with the class custom-slick-slider.

Here is what the settings mean:

  • infinite: true allows the slider to loop continuously.
  • slidesToShow: 3 displays three slides at a time.
  • slidesToScroll: 1 moves one slide per navigation.
  • dots: true shows pagination dots.
  • arrows: true shows previous and next arrows.
  • autoplay: true enables automatic sliding.
  • autoplaySpeed: 3000 changes slides every 3 seconds.
  • pauseOnHover: true pauses autoplay when the user hovers over the slider.

Step 5: Add Custom CSS for Slider Design

Now add some CSS to style your custom Slick Slider.

You can place this CSS inside your child theme’s style.css file or in the WordPress Customizer under Appearance > Customize > Additional CSS.

.custom-slick-slider {
    margin: 40px auto;
    max-width: 1200px;
}

.custom-slick-slider .slider-item {
    padding: 10px;
}

.custom-slick-slider .slider-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.custom-slick-slider .slick-prev,
.custom-slick-slider .slick-next {
    z-index: 10;
}

.custom-slick-slider .slick-dots {
    bottom: -35px;
}

This makes the images responsive, gives them equal height, adds spacing between slides, and improves the overall appearance.

Step 6: Make the Slick Slider Responsive

A good WordPress slider should look clean on desktops, tablets, and mobile devices.

Update your slick-init.js file with responsive breakpoints:

jQuery(document).ready(function($) {
    $('.custom-slick-slider').slick({
        infinite: true,
        slidesToShow: 3,
        slidesToScroll: 1,
        dots: true,
        arrows: true,
        autoplay: true,
        autoplaySpeed: 3000,
        speed: 600,
        pauseOnHover: true,
        responsive: [
            {
                breakpoint: 1024,
                settings: {
                    slidesToShow: 2,
                    slidesToScroll: 1
                }
            },
            {
                breakpoint: 600,
                settings: {
                    slidesToShow: 1,
                    slidesToScroll: 1,
                    arrows: false
                }
            }
        ]
    });
});

With this setup:

  • Desktop shows 3 slides
  • Tablet shows 2 slides
  • Mobile shows 1 slide
  • Arrows are hidden on smaller screens for a cleaner mobile experience

This is useful when creating a responsive Slick Slider in WordPress without a plugin.

How to Create a Slick Slider Shortcode in WordPress

If you want to display your slider anywhere using a shortcode, you can create a custom WordPress shortcode.

This is useful when you want to add your Slick Slider inside:

Add this code to your child theme’s functions.php file:

function codecanel_slick_slider_shortcode($atts) {
    $atts = shortcode_atts(
        array(
            'ids' => '',
        ),
        $atts,
        'codecanel_slick_slider'
    );

    if (empty($atts['ids'])) {
        return '';
    }

    $image_ids = explode(',', $atts['ids']);

    ob_start();
    ?>
    <div class="custom-slick-slider shortcode-slick-slider">
        <?php foreach ($image_ids as $image_id) : 
            $image_id = intval($image_id);
            $image_url = wp_get_attachment_image_url($image_id, 'large');
            $image_alt = get_post_meta($image_id, '_wp_attachment_image_alt', true);

            if ($image_url) :
        ?>
            <div class="slider-item">
                <img src="<?php echo esc_url($image_url); ?>" alt="<?php echo esc_attr($image_alt); ?>">
            </div>
        <?php 
            endif;
        endforeach; 
        ?>
    </div>
    <?php

    return ob_get_clean();
}
add_shortcode('codecanel_slick_slider', 'codecanel_slick_slider_shortcode');

Now you can use this shortcode:

[codecanel_slick_slider ids="12,25,38,41"]

Replace the numbers with your WordPress Media Library image IDs.

This is one of the easiest ways to create a custom Slick Slider shortcode in WordPress.

How to Find Image IDs in WordPress

To use the shortcode above, you need the image IDs from the WordPress Media Library.

Follow these steps:

  1. Go to Media > Library.
  2. Click on an image.
  3. Look at the URL in your browser.
  4. Find the number after item=.
  5. Copy that number and use it in your shortcode.

Example:

post.php?post=25&action=edit

Here, the image ID is 25.

How to Create a Dynamic Slick Slider Using WordPress Posts

You can also create a dynamic Slick Slider using WordPress posts.

This is useful if you want to display your latest blog posts in a carousel.

Add this code to your template file:

<?php
$slider_query = new WP_Query(array(
    'post_type'      => 'post',
    'posts_per_page' => 6,
    'post_status'    => 'publish',
));

if ($slider_query->have_posts()) : ?>
    <div class="custom-slick-slider post-slick-slider">
        <?php while ($slider_query->have_posts()) : $slider_query->the_post(); ?>
            <div class="slider-item post-slider-item">
                <a href="<?php the_permalink(); ?>">
                    <?php if (has_post_thumbnail()) : ?>
                        <?php the_post_thumbnail('large'); ?>
                    <?php endif; ?>

                    <h3><?php the_title(); ?></h3>
                </a>
            </div>
        <?php endwhile; ?>
    </div>
<?php 
endif;
wp_reset_postdata();
?>

Add some CSS:

.post-slider-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.post-slider-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.post-slider-item h3 {
    font-size: 18px;
    line-height: 1.4;
    padding: 16px;
    margin: 0;
}

.post-slider-item a {
    text-decoration: none;
    color: inherit;
}

This creates a dynamic WordPress post carousel using Slick Slider.

How to Create a Slick Slider with Custom Post Type

If your website has a portfolio, testimonials, services, or case studies, you may want to create a Slick Slider from a custom post type.

For example, if your custom post type is portfolio, use this code:

<?php
$portfolio_slider = new WP_Query(array(
    'post_type'      => 'portfolio',
    'posts_per_page' => 8,
    'post_status'    => 'publish',
));

if ($portfolio_slider->have_posts()) : ?>
    <div class="custom-slick-slider portfolio-slick-slider">
        <?php while ($portfolio_slider->have_posts()) : $portfolio_slider->the_post(); ?>
            <div class="slider-item portfolio-slider-item">
                <a href="<?php the_permalink(); ?>">
                    <?php if (has_post_thumbnail()) : ?>
                        <?php the_post_thumbnail('large'); ?>
                    <?php endif; ?>

                    <div class="portfolio-content">
                        <h3><?php the_title(); ?></h3>
                        <p><?php echo wp_trim_words(get_the_excerpt(), 15); ?></p>
                    </div>
                </a>
            </div>
        <?php endwhile; ?>
    </div>
<?php 
endif;
wp_reset_postdata();
?>

You can replace portfolio with your own custom post type name.

Examples:

'post_type' => 'testimonial'
'post_type' => 'case_study'
'post_type' => 'service'
'post_type' => 'project'

This method is perfect for creating a dynamic custom post type slider in WordPress.

How to Create a Slick Slider with ACF Repeater Fields

If you use Advanced Custom Fields, you can create a custom image slider using ACF repeater fields.

For example, create an ACF repeater field called:

slider_images

Inside the repeater, add an image field called:

slider_image

Then add this code to your template file:

<?php if (have_rows('slider_images')) : ?>
    <div class="custom-slick-slider acf-slick-slider">
        <?php while (have_rows('slider_images')) : the_row(); 
            $image = get_sub_field('slider_image');

            if ($image) :
                $image_url = $image['url'];
                $image_alt = $image['alt'];
        ?>
            <div class="slider-item">
                <img src="<?php echo esc_url($image_url); ?>" alt="<?php echo esc_attr($image_alt); ?>">
            </div>
        <?php 
            endif;
        endwhile; 
        ?>
    </div>
<?php endif; ?>

This is helpful when you want a different slider for each page or post.

For example, you can use ACF Slick Slider for:

How to Add Slick Slider in Elementor

There are two simple ways to add a custom Slick Slider in Elementor.

Method 1: Use the Shortcode Widget

If you created the shortcode earlier, simply add this shortcode inside Elementor’s Shortcode widget:

[codecanel_slick_slider ids="12,25,38,41"]

This is the easiest method because you do not need to add HTML directly inside Elementor.

Method 2: Use the HTML Widget

You can also add your slider markup inside Elementor’s HTML widget:

<div class="custom-slick-slider">
    <div class="slider-item">
        <img src="https://example.com/image-1.jpg" alt="Elementor slick slider image 1">
    </div>

    <div class="slider-item">
        <img src="https://example.com/image-2.jpg" alt="Elementor slick slider image 2">
    </div>

    <div class="slider-item">
        <img src="https://example.com/image-3.jpg" alt="Elementor slick slider image 3">
    </div>
</div>

Make sure your Slick Slider CSS and JS files are already enqueued in your WordPress theme. Otherwise, the slider will not work.

How to Add a Slick Slider in WooCommerce

You can use Slick Slider to create a WooCommerce product carousel.

This is useful for displaying:

  • Featured products
  • Latest products
  • Sale products
  • Related products
  • Category-based product sliders
  • Best-selling products

Here is a simple WooCommerce product slider shortcode.

Add this code to your child theme’s functions.php file:

function codecanel_woocommerce_product_slider_shortcode($atts) {
    $atts = shortcode_atts(
        array(
            'limit'    => 8,
            'category' => '',
        ),
        $atts,
        'codecanel_product_slider'
    );

    $args = array(
        'post_type'      => 'product',
        'posts_per_page' => intval($atts['limit']),
        'post_status'    => 'publish',
    );

    if (!empty($atts['category'])) {
        $args['tax_query'] = array(
            array(
                'taxonomy' => 'product_cat',
                'field'    => 'slug',
                'terms'    => sanitize_text_field($atts['category']),
            ),
        );
    }

    $product_query = new WP_Query($args);

    ob_start();

    if ($product_query->have_posts()) : ?>
        <div class="custom-slick-slider woocommerce-slick-slider">
            <?php while ($product_query->have_posts()) : $product_query->the_post(); 
                global $product;
            ?>
                <div class="slider-item product-slider-item">
                    <a href="<?php the_permalink(); ?>">
                        <?php if (has_post_thumbnail()) : ?>
                            <?php the_post_thumbnail('woocommerce_thumbnail'); ?>
                        <?php endif; ?>

                        <h3><?php the_title(); ?></h3>

                        <?php if ($product) : ?>
                            <div class="product-price">
                                <?php echo wp_kses_post($product->get_price_html()); ?>
                            </div>
                        <?php endif; ?>
                    </a>
                </div>
            <?php endwhile; ?>
        </div>
    <?php endif;

    wp_reset_postdata();

    return ob_get_clean();
}
add_shortcode('codecanel_product_slider', 'codecanel_woocommerce_product_slider_shortcode');

Now you can use this shortcode:

[codecanel_product_slider limit="8"]

Or display products from a specific category:

[codecanel_product_slider limit="8" category="t-shirts"]

Add this CSS for better product slider design:

.product-slider-item {
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.product-slider-item img {
    width: 100%;
    height: auto;
    margin-bottom: 12px;
}

.product-slider-item h3 {
    font-size: 17px;
    margin: 10px 0;
}

.product-slider-item a {
    text-decoration: none;
    color: inherit;
}

.product-price {
    font-weight: 600;
    margin-top: 8px;
}

This lets you create a custom WooCommerce product carousel with Slick Slider.

Common Slick Slider Problems and Fixes in WordPress

Sometimes Slick Slider may not work properly in WordPress because of script loading issues, jQuery conflicts, missing CSS, or incorrect initialization.

Here are the most common problems and how to fix them.

ProblemPossible ReasonSolution
Slick Slider not workingSlick JS file is not loadedCheck your wp_enqueue_script() path
Images show in a vertical listSlick CSS is missingMake sure slick.css is loaded
“slick is not a function” errorSlick JS loads before jQuery or init file loads too earlySet jQuery and Slick as dependencies
$ is not a function errorWordPress uses jQuery no-conflict modeUse jQuery(document).ready(function($) {})
Arrows not showingTheme CSS conflict or missing Slick theme CSSLoad slick-theme.css or create custom arrows
Dots not workingIncorrect initialization or CSS conflictCheck dots: true and inspect CSS
Slider not responsiveNo breakpoint settings addedAdd responsive settings in JS
Slider breaks after AJAX loadSlider initialized before AJAX content appearsReinitialize Slick after AJAX content loads
Layout jumps while loadingImages do not have fixed heightAdd CSS height and object-fit: cover
Multiple sliders conflictSame class used incorrectlyUse unique classes for different slider types

How to Fix “slick is not a function” in WordPress

This is one of the most common Slick Slider errors in WordPress.

Usually, it happens because:

  • Slick Slider JS is not loaded
  • jQuery is not loaded
  • Slick loads before jQuery
  • Your custom JS runs before Slick loads
  • Another plugin causes a JavaScript conflict

To fix this, make sure your enqueue code has the correct dependencies:

wp_enqueue_script(
    'custom-slick-init',
    get_stylesheet_directory_uri() . '/assets/js/slick-init.js',
    array('jquery', 'slick-js'),
    '1.0.0',
    true
);

Also, make sure your initialization code uses WordPress-friendly jQuery syntax:

jQuery(document).ready(function($) {
    $('.custom-slick-slider').slick();
});

Do not write only this in WordPress:

$(document).ready(function() {
    $('.custom-slick-slider').slick();
});

WordPress often runs jQuery in no-conflict mode, so using $ directly may cause errors unless it is properly passed into the function.

Useful Slick Slider Settings for WordPress

Here are some common Slick Slider settings you can use:

SettingExampleWhat It Does
slidesToShow3Number of visible slides
slidesToScroll1Number of slides to move
autoplaytrueEnables automatic sliding
autoplaySpeed3000Time between slides
dotstrueShows pagination dots
arrowstrueShows previous/next arrows
infinitetrueLoops the slider
speed600Controls transition speed
pauseOnHovertruePauses autoplay on hover
fadetrueCreates a fade effect
centerModetrueCenters the active slide
adaptiveHeighttrueAdjusts height based on slide content
responsivearrayAdds mobile and tablet breakpoints

Example with more advanced settings:

jQuery(document).ready(function($) {
    $('.advanced-slick-slider').slick({
        slidesToShow: 3,
        slidesToScroll: 1,
        infinite: true,
        dots: true,
        arrows: true,
        autoplay: true,
        autoplaySpeed: 4000,
        speed: 700,
        pauseOnHover: true,
        centerMode: false,
        adaptiveHeight: false,
        responsive: [
            {
                breakpoint: 992,
                settings: {
                    slidesToShow: 2
                }
            },
            {
                breakpoint: 576,
                settings: {
                    slidesToShow: 1,
                    arrows: false
                }
            }
        ]
    });
});

Best Practices for Custom Slick Slider in WordPress

To make your custom Slick Slider perform better, follow these best practices.

1. Use Optimized Images

Large images can slow down your slider and affect page speed. Before uploading images to WordPress, compress them and use the correct size.

For example, if your slider image displays at 600px wide, avoid uploading a 3000px image unless needed.

2. Add Descriptive Alt Text

Every image should have meaningful alt text. This helps with accessibility and image SEO.

Example:

<img src="slider-image.jpg" alt="Custom Slick Slider example in WordPress">

3. Avoid Too Many Slides

Do not add too many slides unless necessary. A slider with 5 to 8 slides is usually enough for most sections.

Too many slides can make the page heavier and reduce user engagement.

4. Keep Mobile Users in Mind

Always test your slider on mobile devices. Make sure:

  • Images are readable
  • Arrows do not cover content
  • Dots are clickable
  • Text is not too small
  • Slider does not create horizontal scrolling

5. Use Lazy Loading

WordPress supports lazy loading for images by default in many cases. You can also add the loading attribute manually:

<img src="image.jpg" alt="Slider image" loading="lazy">

This helps improve loading performance.

6. Avoid Loading Slick Slider on Every Page

If you only use Slick Slider on one or two pages, do not load the files across the entire website.

You can conditionally enqueue the files on specific pages:

function codecanel_enqueue_slick_conditionally() {
    if (is_front_page() || is_page('gallery')) {
        wp_enqueue_style(
            'slick-css',
            get_stylesheet_directory_uri() . '/assets/slick/slick.css',
            array(),
            '1.8.1'
        );

        wp_enqueue_script(
            'slick-js',
            get_stylesheet_directory_uri() . '/assets/slick/slick.min.js',
            array('jquery'),
            '1.8.1',
            true
        );
    }
}
add_action('wp_enqueue_scripts', 'codecanel_enqueue_slick_conditionally');

This can help reduce unnecessary CSS and JavaScript loading.

Custom Slick Slider vs WordPress Slider Plugin

A custom Slick Slider is not always the right choice for everyone. Sometimes, a plugin is faster and easier.

Here is a quick comparison:

OptionBest ForProsCons
Custom Slick SliderDevelopers and advanced usersLightweight, flexible, fully customizableRequires coding
WordPress Slider PluginBeginners and non-codersEasy setup, visual controls, no coding neededMay add extra scripts
Elementor Slider WidgetElementor usersEasy drag-and-drop editingLimited custom control
WooCommerce Product Slider PluginStore ownersProduct-focused featuresMay require premium version
Before/After Slider PluginImage comparison slidersGreat for transformation, editing, design, and comparison imagesNot for regular carousel use

If your goal is to show normal image carousels, testimonials, posts, or products, a custom Slick Slider can be a good solution.

But if your goal is to show image comparisons, such as before-and-after results, design changes, editing samples, beauty transformations, real estate renovations, or product improvements, a before-after image comparison plugin is more suitable.

For that use case, you can use WP Before After Image Slider by CodeCanel. It helps you create interactive before-and-after sliders in WordPress without coding and lets users compare two images with a draggable handle.

When Should You Use a Custom Slick Slider?

You should create a custom Slick Slider in WordPress when:

A custom Slick Slider is especially useful for developers building custom WordPress websites.

When Should You Use a Slider Plugin Instead?

You should use a WordPress slider plugin when:

  • You do not want to write code
  • You need a visual drag-and-drop builder
  • You want ready-made templates
  • You need animation presets
  • You want support and plugin settings
  • You need a quick solution for clients
  • You want to manage sliders from the dashboard

For non-technical users, a plugin is usually easier. For developers, a custom Slick Slider gives more control.

Final Thoughts

Creating a custom Slick Slider in WordPress is a great way to add a responsive, lightweight, and fully customizable carousel to your website without depending on a heavy plugin.

With Slick Slider, you can build image sliders, blog post carousels, portfolio sliders, testimonial sliders, WooCommerce product sliders, ACF sliders, and custom post type sliders. You can also create shortcodes to display your slider anywhere on your website.

The key steps are simple:

  1. Add Slick Slider files to your WordPress theme.
  2. Enqueue the CSS and JavaScript files properly.
  3. Add your slider HTML markup.
  4. Initialize Slick Slider with jQuery.
  5. Customize the design with CSS.
  6. Add responsive breakpoints.
  7. Test the slider on desktop, tablet, and mobile.

If you are comfortable with code, this method gives you full control over your WordPress slider. But if you need a visual image comparison slider, especially for before-and-after images, a dedicated plugin like WP Before After Image Slider can save time and make the process easier.

Whether you choose custom code or a plugin, the main goal is the same: create a smooth, user-friendly slider that improves your website design and helps visitors engage with your content.

FAQs

How do I create a custom Slick Slider in WordPress?

To create a custom Slick Slider in WordPress, download the Slick Slider files, add them to your child theme, enqueue the CSS and JS files using wp_enqueue_style() and wp_enqueue_script(), add slider HTML markup, and initialize the slider with jQuery.

Can I add Slick Slider in WordPress without a plugin?

Yes, you can add Slick Slider in WordPress without a plugin. You need to manually add the Slick Slider files to your theme, enqueue them properly, and write custom HTML and JavaScript to initialize the slider.

How do I enqueue Slick Slider in WordPress?

You can enqueue Slick Slider by adding wp_enqueue_style() and wp_enqueue_script() functions inside your theme’s functions.php file. Make sure jQuery loads before the Slick Slider JS file.

Why is my Slick Slider not working in WordPress?

Your Slick Slider may not work because the JS file is missing, jQuery is not loaded, files are loading in the wrong order, the slider class name is incorrect, or another plugin is causing a JavaScript conflict.

How do I fix “slick is not a function” in WordPress?

To fix “slick is not a function,” make sure Slick Slider JS is loaded after jQuery and before your custom initialization file. Also, use jQuery(document).ready(function($) {}) instead of using $ directly.

How do I make Slick Slider responsive in WordPress?

You can make Slick Slider responsive by using the responsive option in your Slick initialization code. Add breakpoints for desktop, tablet, and mobile screen sizes.

Can I create a Slick Slider shortcode in WordPress?

Yes, you can create a custom shortcode in WordPress using add_shortcode(). This lets you display your Slick Slider inside posts, pages, Elementor, Gutenberg, and widget areas.

Can I use Slick Slider with Elementor?

Yes, you can use Slick Slider with Elementor. The easiest way is to create a shortcode and place it inside Elementor’s Shortcode widget. You can also add slider HTML inside an Elementor HTML widget.

Can I use Slick Slider with ACF repeater fields?

Yes, Slick Slider works well with ACF repeater fields. You can create a repeater field for slider images and loop through those fields inside your WordPress template.

Can I use Slick Slider for WooCommerce products?

Yes, you can create a WooCommerce product carousel using Slick Slider. You can query products using WP_Query and display them inside a custom Slick Slider layout.

This page was last edited on 6 July 2026, at 1:07 pm