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.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)