Owl Carousel
Creating a featured post slideshow with Easy Query and Owl Carousel
In this example:
Easy Query and Owl Carousel work together to display featured posts in a beautiful slider format.
Owl Carousel is a popular touch-enabled jQuery plugin that lets you easily create a responsive carousel slider.
Vivamus sagittis lacus vel augue laoreet
Curabitur blandit tempus porttitor. Donec id elit non mi porta gravida at eget metus. Curabitur blandit tempus porttitor. Curabitur...
Maecenas sed diam eget risus varius blandit
Maecenas sed diam eget risus varius blandit sit amet non magna. Cras justo odio, dapibus ac facilisis in, egestas...
Vestibulum id ligula porta felis euismod
Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia...
Etiam porta sem malesuada magna mollis euismod
Donec sed odio dui. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Morbi leo risus, porta...
Lorem ipsum dolor sit amet, consectetur adipiscing elit
Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Curabitur blandit tempus...
Donec id elit non mi porta gravida at eget metus
Maecenas sed diam eget risus varius blandit sit amet non magna. Praesent commodo cursus magna, vel scelerisque nisl consectetur...
Javascript
The following code should be placed inside your website javascript file.
$(function() {
if($('.owl-carousel').length){
$(".wp-easy-query-posts .owl-carousel").owlCarousel({
navigation : true, // Show next and prev buttons
slideSpeed : 300,
paginationSpeed : 400,
singleItem:true,
});
}
});
JavaScriptThe following shortcode was used to create the Owl Carousel example.
[easy_query container="div" classes="owl-carousel" post_type="post" post__in="8, 12, 15, 16, 21" posts_per_page="6" paging="false"]