How to make dynamically adding sliders to wordpress?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
32 views
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 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 attached5ae172d0a7fa6636582540.jpeg
by | 32 views

1 Answer

0 like 0 dislike
Why do you have to initialize each slider if you have it the styles are the same and the settings are all the same. Specify a unique class and initializers. I did so, but with owl-carousel
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Jun 13, 2019 by MegaPuxapb
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users