Answer the question
In order to leave comments, you need to log in
How to display unlimited swiper-slide using toolset on wordpress?
I have a loop for displaying slides in the gallery section. It is necessary to add photos using the add new button so that their number is not limited. But the photos are not displayed if you loop one slide.
<div class="swiper-container swiper-gallery">
<!-- Additional required wrapper-->
<ul class="swiper-wrapper my-gallery" itemscope="" itemtype="http://schema.org/ImageGallery">
<!-- Slides-->
<?php $query = new WP_Query( array( 'post_type' => array( 'gallery' ), 'order' => 'ASC' )); if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
<li class="swiper-slide" itemprop="associatedMedia" itemscope="" itemtype="http://schema.org/ImageObject"><a title="click to zoom-in" href="<?php echo get_post_meta($post->ID,'wpcf-foto', true); ?>" itemprop="contentUrl" data-size="1200x600"><img src="<?php echo get_post_meta($post->ID,'wpcf-foto', true); ?>" itemprop="thumbnail" alt="Image description"></a></li>
<?php endwhile; endif; wp_reset_query(); ?>
</ul>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question