Hi
I have this part of code:
$(document).ready(function () {
$('.c-slider__item').owlCarousel({
animateOut: 'fadeOut',
animateIn: 'faceIn',
items: 1,
loop: true,
autoplay: true,
autoplayTimeout: 5000,
autoplayHoverPause: true,
mouseDrag: true,
nav: true,
dots: false,
lazyLoad: true,
navText: [
'<span aria-label="' + 'Previous' + '"><i class="fas fa-caret-left"></i></span>',
'<span aria-label="' + 'Next' + '"><i class="fas fa-caret-right"></i></span>'
],
});
and now I need add checkbox conditional, so I create:
(...)
nav: '<?php
// vars
$slider_options = get_field('slider_options');
// check
if( $slider_options && in_array('nav', $slider_options) ): ?>
true
<?php endif; ?>',
(...)
but I can’t get the “true” value on frontend. I was trying with “value”, “label” and “both (array)” options in Checkbox field settings, but without results. How should I do it right?