Answer the question
In order to leave comments, you need to log in
How to display some data from an array via AJAX?
Good afternoon, dear experts)
The bottom line is the following. There is a loop with a nested loop, they should display a large number of photos per page. Data is entered through the ACF plugin.
<?php foreach($rows as $row) { ?>
<div class="flexslider slider-album">
<ul class="slides">
<?php foreach ($row['albums_image'] as $image_album) { ?>
<li>
<img src="<?php echo $image_album['sizes']['album-image']; ?>">
</li>
<?php } ?>
</ul>
</div>
<?php } ?>
Answer the question
In order to leave comments, you need to log in
Solved the problem in the following way.
<?php
$i = 0;
foreach($rows as $row) { if ($i == 1) { ?>
<div class="flexslider slider-album">
<ul class="slides">
<?php foreach ($row['albums_image'] as $image_album) { ?>
<li>
<img src="<?php echo $image_album['sizes']['album-image']; ?>">
</li>
<?php } ?>
</ul>
</div>
<?php } $i++; } ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question