jcadima
7/7/2017 - 8:54 PM

Owl carousel

Owl carousel


https://owlcarousel2.github.io/OwlCarousel2/demos/demos.html

<link rel="stylesheet" type="text/css" href="<?php echo get_bloginfo('template_directory') . '/assets/css/owl.carousel.min.css' ; ?>">   
<link rel="stylesheet" type="text/css" href="<?php echo get_bloginfo('template_directory') . '/assets/css/owl.theme.default.min.css' ; ?>"> 

<script src="<?php echo get_bloginfo('template_directory') . '/assets/js/owl.carousel.min.js' ; ?>"></script>

<!--  THE HTML  -->
<div class="owl-carousel owl-theme row">
		 <?php 
			 //$i = 0;	
			 foreach ( $banner_images as $banner_image ) : ?>
			 	<div class="item"><img src="<?php echo $banner_image ; ?>"></div>
			
			<?php  endforeach;  ?>  	
</div>


<!--  THE JS   -->
<script>

jQuery('.owl-carousel').owlCarousel({
    loop:true,
    margin:10,
    nav:true,
    items:1

});
	
</script>