Every week, we provide you with new and free Divi layout packs which you can use for your next project. For one of the layout packs, we also share a use case that’ll help you take your website to the next level.

This week, as part of our ongoing Divi design initiative, we’re going to show you how to how to create an automatic carousel with Divi, Slick.js and the Ice Cream Shop Layout Pack. We’ll start by including the slick JS library in our website and continue by making it work inside the Divi Builder. This is a great way to create an automatic carousel for any kind of module you want to showcase. You’ll be able to download the JSON file for free as well!

Let’s get to it.

Preview

Before we dive into the tutorial, let’s take a quick look at the outcome across different screen sizes.

Desktop

how-to-create-an-automatic-carousel-with-divi-slick-js How to Create an Automatic Carousel with Divi & Slick.js

Mobile

how-to-create-an-automatic-carousel-with-divi-slick-js-1 How to Create an Automatic Carousel with Divi & Slick.js

Download The Automatic Carousel Layout for FREE

To lay your hands on the free automatic carousel layout, you will first need to download it using the button below. To gain access to the download you will need to subscribe to our Divi Daily email list by using the form below. As a new subscriber, you will receive even more Divi goodness and a free Divi Layout pack every Monday! If you’re already on the list, simply enter your email address below and click download. You will not be “resubscribed” or receive extra emails.

You have successfully subscribed. Please check your email address to confirm your subscription and get access to free weekly Divi layout packs!

Make sure you include the Slick.js file in your head tags! Without it, it won’t work. See the first step below.

1. Add Slick JS to Your Divi Theme Integration

Go to Divi Theme Options

The first part of this tutorial is a very important one; adding Slick.js to your website. To do that, go to your Divi Theme Options.

how-to-create-an-automatic-carousel-with-divi-slick-js How to Create an Automatic Carousel with Divi & Slick.js

Add Slick.js to Head Tags

Navigate to the integration tab and add the Slick.js file to the head tags of your website.

https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.js

how-to-create-an-automatic-carousel-with-divi-slick-js-1 How to Create an Automatic Carousel with Divi & Slick.js

2. Create New Page Using Ice Cream Shop Menu Layout

Add New Page

Continue by adding a new page to your website. Give your page a title, publish the page and switch over to Divi Builder.

how-to-create-an-automatic-carousel-with-divi-slick-js-2 How to Create an Automatic Carousel with Divi & Slick.js

Upload Ice Cream Shop Menu Layout

For this tutorial, we’re using the Ice Cream Shop Layout Pack’s menu layout, but feel free to use any other page/layout of your choice.

how-to-create-an-automatic-carousel-with-divi-slick-js-3 How to Create an Automatic Carousel with Divi & Slick.js

2. Add New Section to Page

Add New Section

The next step in creating the automatic carousel is adding a new section to your page.

how-to-create-an-automatic-carousel-with-divi-slick-js-4 How to Create an Automatic Carousel with Divi & Slick.js

Background Color

Open the section settings and change the background color.

  • Background Color: #f5f5f5

how-to-create-an-automatic-carousel-with-divi-slick-js-5 How to Create an Automatic Carousel with Divi & Slick.js

Bottom Divider

Add a bottom divider to the section as well.

  • Divider Style: Find in List
  • Divider Color: #ffffff
  • Divider Weight: 10vw

how-to-create-an-automatic-carousel-with-divi-slick-js-6 How to Create an Automatic Carousel with Divi & Slick.js

Spacing

Along with some bottom padding.

  • Bottom Padding: 10vw

how-to-create-an-automatic-carousel-with-divi-slick-js-7 How to Create an Automatic Carousel with Divi & Slick.js

Add New Row

Column Structure

Continue by adding the first row using the following column structure:

how-to-create-an-automatic-carousel-with-divi-slick-js-8 How to Create an Automatic Carousel with Divi & Slick.js

Add Title Text Module to Column

Add H2 Content

Add a Text Module to the row’s column and insert some H2 content of your choice.

how-to-create-an-automatic-carousel-with-divi-slick-js-9 How to Create an Automatic Carousel with Divi & Slick.js

H2 Text Settings

Move on to the design tab and change the H2 text settings accordingly:

  • Heading 2 Font: Prompt
  • Heading 2 Font Weight: Ultra Light
  • Heading 2 Text Alignment: Center
  • Heading 2 Text Size: 60px (Desktop), 40px (Tablet), 25px (Phone)
  • Heading 2 Line Height: 1.2em

how-to-create-an-automatic-carousel-with-divi-slick-js-10 How to Create an Automatic Carousel with Divi & Slick.js

Sizing

Modify the module’s sizing settings too.

  • Max Width: 800px
  • Module Alignment: Center

how-to-create-an-automatic-carousel-with-divi-slick-js-11 How to Create an Automatic Carousel with Divi & Slick.js

3. Dedicate New One-Column Row to Automatic Slider

Add New Row

Column Structure

To create the automatic carousel, we’ll need to dedicate a new row to the items we want to place inside the carousel. Make sure you choose a row with one column only. In the upcoming steps, we’ll transform this column into an automatic carousel.

how-to-create-an-automatic-carousel-with-divi-slick-js-12 How to Create an Automatic Carousel with Divi & Slick.js

Sizing

Without adding any modules yet, open the row settings and allow the row to take up the entire width of the screen in the sizing settings.

  • Width: 100%
  • Max Width: 100%

how-to-create-an-automatic-carousel-with-divi-slick-js-13 How to Create an Automatic Carousel with Divi & Slick.js

Spacing

Add some top margin and remove all default top and bottom padding next.

  • Top Margin: 50px
  • Top Padding: 0px
  • Bottom Padding: 0px

how-to-create-an-automatic-carousel-with-divi-slick-js-14 How to Create an Automatic Carousel with Divi & Slick.js

Overflows

We’re also making sure nothing surpasses the row container by hiding the overflows.

  • Horizontal Overflow: Hidden
  • Vertical Overflow: Hidden

how-to-create-an-automatic-carousel-with-divi-slick-js-15 How to Create an Automatic Carousel with Divi & Slick.js

Column Settings

Continue by opening the column settings.

how-to-create-an-automatic-carousel-with-divi-slick-js-16 How to Create an Automatic Carousel with Divi & Slick.js

CSS Classes

Add two different CSS classes to the column. Make sure you leave a space in between them. Later on this tutorial, we’ll use these classes to create the automatic carousel.

  • CSS Class: icecream-items slider

how-to-create-an-automatic-carousel-with-divi-slick-js-17 How to Create an Automatic Carousel with Divi & Slick.js

Add First Slider Item to Column (Call to Action Module)

Default Content

Time to start adding the first carousel item! We’ll use a Call to Action Module but feel free to use any other module of your choice. Enter some content of your choice.

how-to-create-an-automatic-carousel-with-divi-slick-js-18 How to Create an Automatic Carousel with Divi & Slick.js

Hover Content

Replace the title and body content with an empty character (such as this one: ‘ ’) to remove the content on hover.

how-to-create-an-automatic-carousel-with-divi-slick-js-19 How to Create an Automatic Carousel with Divi & Slick.js

Link

Make sure you add a link to the module as well so the button shows up.

  • Button Link URL: #

how-to-create-an-automatic-carousel-with-divi-slick-js-20 How to Create an Automatic Carousel with Divi & Slick.js

Default Gradient Background

Then, go to the background settings and add a gradient background.

  • Color 1: #8300e9
  • Color 2: rgba(41,196,169,0)
  • Gradient Type: Radial
  • Radial Direction: Top
  • Start Position: 35%
  • End Position: 35%

how-to-create-an-automatic-carousel-with-divi-slick-js-21 How to Create an Automatic Carousel with Divi & Slick.js

Remove Hover Gradient Background

Remove the gradient background on hover.

how-to-create-an-automatic-carousel-with-divi-slick-js-22 How to Create an Automatic Carousel with Divi & Slick.js

Background Image

Upload a relevant background image as well.

how-to-create-an-automatic-carousel-with-divi-slick-js-23 How to Create an Automatic Carousel with Divi & Slick.js

Title Text Settings

Move on to the design tab and change the title text settings accordingly:

  • Title Font: Prompt
  • Title Text Size: 2vw (Desktop), 4vw (Tablet), 5vw (Phone)
  • Title Line Height: 2vw (Desktop), 3vw (Tablet), 4vw (Phone)

how-to-create-an-automatic-carousel-with-divi-slick-js-24 How to Create an Automatic Carousel with Divi & Slick.js

Body Text Settings

Modify the body text settings as well.

  • Body Font: Open Sans
  • Body Text Size: 0.9vw (Desktop), 2vw (Tablet), 2.5vw (Phone)
  • Body Line Height: 1vw (Desktop), 2vw (Tablet), 3vw (Phone)

how-to-create-an-automatic-carousel-with-divi-slick-js-25 How to Create an Automatic Carousel with Divi & Slick.js

Button Settings

Then, go to the button settings and style the button as follows:

  • Use Custom Styles For Button: Yes
  • Button Text Size: 0.9vw (Desktop), 1.5vw (Tablet), 2vw (Phone)
  • Button Text Color: #ffffff
  • Button Background Color: #000000 (Default), #ff6f7e (Hover)
  • Button Border Width: 0px

how-to-create-an-automatic-carousel-with-divi-slick-js-26 How to Create an Automatic Carousel with Divi & Slick.js

  • Button Border Radius: 0px
  • Button Letter Spacing: 2px
  • Button Font: Prompt
  • Button Font Weight: Regular
  • Button Font Style: Uppercase

how-to-create-an-automatic-carousel-with-divi-slick-js-27 How to Create an Automatic Carousel with Divi & Slick.js

  • Top Margin: 19vw (Desktop), 30vw (Tablet), 45vw (Phone)
  • Top Padding: 1vw (Desktop), 2vw (Tablet), 3vw (Phone)
  • Bottom Padding: 1vw (Desktop), 2vw (Tablet), 3vw (Phone)
  • Left Padding: 2vw (Desktop), 4vw (Tablet), 5vw (Phone)
  • Right Padding: 2vw (Desktop), 4vw (Tablet), 5vw (Phone)

how-to-create-an-automatic-carousel-with-divi-slick-js-28 How to Create an Automatic Carousel with Divi & Slick.js

Sizing

We’re also modifying the module’s width and height.

  • Width: 23vw
  • Height: 23vw (Desktop), 50vw (Tablet), 80vw (Phone)

how-to-create-an-automatic-carousel-with-divi-slick-js-29 How to Create an Automatic Carousel with Divi & Slick.js

Spacing

Last but not least, go to the spacing settings and add some custom margin and padding values.

  • Left Margin: 1vw
  • Right Margin: 1vw
  • Top Padding: 2vw (Desktop), 4vw (Tablet), 6vw (Phone)

how-to-create-an-automatic-carousel-with-divi-slick-js-30 How to Create an Automatic Carousel with Divi & Slick.js

4. Clone Slider Item as Many Times as Wanted

Clone CTA Module Four Times

Once you’ve completed the first CTA Module, you can go ahead and clone it up to as many times as you want. Every module in this column will be part of the automatic carousel.

how-to-create-an-automatic-carousel-with-divi-slick-js-31 How to Create an Automatic Carousel with Divi & Slick.js

Change Content, Gradient Background & Background Image for Each Duplicate

Make sure you change the content, gradient background and background image of each duplicate to make each CTA Module unique.

how-to-create-an-automatic-carousel-with-divi-slick-js-32 How to Create an Automatic Carousel with Divi & Slick.js

5. Add New Row Below Previous One

Add the next and last row to the section using the following column structure:

how-to-create-an-automatic-carousel-with-divi-slick-js-33 How to Create an Automatic Carousel with Divi & Slick.js

Insert First Code Module with jQuery Code

Add New Code Module to Column

Add a first Code Module to the column.

how-to-create-an-automatic-carousel-with-divi-slick-js-34 How to Create an Automatic Carousel with Divi & Slick.js

Insert CSS Code

And insert the following lines of CSS Code:

<style> .slick-slider { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; -khtml-user-select: none; ms-touch-action: pan-y; touch-action: pan-y; -webkit-tap-highlight-color: transparent; } .slick-slide { float: left; } </style>

how-to-create-an-automatic-carousel-with-divi-slick-js-35 How to Create an Automatic Carousel with Divi & Slick.js

Insert Second Code Module with CSS Code

Add New Code Module to Column

Add another Code Module right below the previous one.

how-to-create-an-automatic-carousel-with-divi-slick-js-36 How to Create an Automatic Carousel with Divi & Slick.js

Insert jQuery Code

And insert the following lines of jQuery code:

 jQuery(function($){ $('.icecream-items').slick({ slidesToShow: 4, slidesToScroll: 1, autoplay: true, autoplaySpeed: 700, arrows: false, dots: false, pauseOnHover: true, responsive: [{ breakpoint: 1079, settings: { slidesToShow: 2 } }] }); }); 

how-to-create-an-automatic-carousel-with-divi-slick-js-37 How to Create an Automatic Carousel with Divi & Slick.js

Once you’ve added the CSS and jQuery code, you can exit the Visual Builder to view the result!

Preview

Now that we’ve gone through all the steps, let’s take a final look at the outcome across different screen sizes.

Desktop

how-to-create-an-automatic-carousel-with-divi-slick-js How to Create an Automatic Carousel with Divi & Slick.js

Mobile

how-to-create-an-automatic-carousel-with-divi-slick-js-1 How to Create an Automatic Carousel with Divi & Slick.js

Final Thoughts

In this post, we’ve shown you how to create an automatic carousel using Divi, slick.js and the Ice Cream Shop Layout Pack. This is a great way to add interaction to your website. You can make this technique work with any kind of module you want to display! If you have any questions or suggestions, make sure you leave a comment in the comment section below.

If you’re eager to learn more about Divi and get more Divi freebies, make sure you subscribe to our email newsletter and YouTube channel so you’ll always be one of the first people to know and get benefits from this free content.


Source

SEO News and More

SEO News and More

Share This