Hello,
Have a look to the FAQ “How can I add a link on Owl Carousel slide?” if you want to add a link to your slides.
To use a lightbox feature, you can change lines 329 to 339 in the owlcarousel.php file (this example use fancybox2):
if(!empty($meta_link)) {
$result .= '<a href="'. $meta_link .'">';
}
if ($lazyLoad){
$result .= '<img class="lazyOwl" title="' . get_the_title() . '" data-src="' . $img_src[0] . '" alt="' . get_the_title() . '"/>';
} else {
$result .= '<img title="' . get_the_title() . '" src="' . $img_src[0] . '" alt="' . get_the_title() . '"/>';
}
if(!empty($meta_link)) {
$result .= '</a>';
}
TO:
if(!empty($meta_link)) {
$result .= '<a href="'. $meta_link .'">';
} else {
$result .= '<a class="fancybox" rel="group" href="' . $img_src[0] . '">';
}
if ($lazyLoad){
$result .= '<img class="lazyOwl" title="' . get_the_title() . '" data-src="' . $img_src[0] . '" alt="' . get_the_title() . '"/>';
} else {
$result .= '<img title="' . get_the_title() . '" src="' . $img_src[0] . '" alt="' . get_the_title() . '"/>';
}
$result .= '</a>';
After, you will need to include fancybox to your web pages and initialize it:
$(".fancybox").fancybox();
Let me know if this solution works.