How to add Owl Carousel slider to Divi child theme
How to add Owl Carousel slider to Divi child theme
I have done this functionality within my own static html code which works as intended with the use of a CDN like I will show below, but I am having confusion of how I would place this inside a child theme I've created (I'm using Divi theme for Wordpress). If someone can show me the proper way of getting the below functionality to work within my child theme that would be great...right now I only have a "functions.php" and "style.css" created to get it working. Thanks!
In my head section...
<!-- Owl Carousel css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css">
<!-- Owl Carousel theme -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css">
Before my body tag closes...
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>
//owl carousel used for scrolling image gallery
<script>
$('.clients').owlCarousel(
loop: true,
dots: false,
margin: 10,
autoplay: true,
autoplayTimeout: 1000,
autoplayHoverPause: true,
responsive:
768:
items: 5
);
</script>
and the html example I use to make it work...
<div class="clients owl-carousel owl-theme">
<div class="thumbnail">
<img src="img/holoBos.png" alt="Nature">
</div>
<div class="thumbnail">
<img src="img/holoAns.png" alt="Nature">
</div>
//more images will be inserted here for as many as needed....
</div>
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.