<?php
// get repeater values as array
$appetizers = get_field('галерея_контент');
// calculate how many items first
$items_count = count($appetizers);
// calculate how much half is, round up
$items_half = ceil($items_count / 6);
// split the repeater
$appetizers_chunks = array_chunk($appetizers, $items_half);
?>
<div class="gallery-slider">
<?php foreach ($appetizers_chunks as $chunk): ?>
<div>
<div class="dis-grid grid-col-lg-3 grid-row-20 grid-col-lm-2 grid-col-xs-2">
<?php foreach ($chunk as $value): ?>
<div class="item">
<a href="<?php echo $value['изображение']; ?>" data-lightbox="roadtrip">
<img src="<?php echo $value['изображение']; ?>">
</a>
<img src="" class="icon svg">
</div>
<?php endforeach; ?>
</div>
</div>
<?php endforeach; ?>
</div>