Good day, tell me how you can dynamically add sliders in wordpress? There is a portfolio page and there are added through the admin job and each job contains a slider. If you add a slider in a standard way, in js you need to register each slider initialization:
$('.carousel-wrap-1').slick({ dots: false, infinite: true, speed: 600, slidesToShow: 5.0, slidesToScroll: 1,
It is desirable to suggest a solution to slick slider, but can prompt other, not critical.
And the slider is displayed using the gallery advanced custom fields pro this code:
<?php$images = get_field('photo_stand');if( $images ): ?><?php foreach( $images as $image ): ?>
![<?php echo $image['alt']; ?>](<?php echo $image['sizes']['portfolio-item-thumb']; ?>)
<?php endforeach; ?><?php endif; ?>
Even if you want to attach each slider its own unique div wrapper (class="slider1" class="slider-2"...) then it will not work, since the calling code is specified 1-n times, and then the portfolio generated by the machine from the admin panel.
And we were data-fancibox to make different from each portfolio that fancybox would normally supply and switch it images only one portfolio? Screenshot attached