<?php $otkatnye_gates = new WP_Query([
'post_type' => 'section_gates',
'post_name' => 'otkatnye-vorota',
'post_status' => 'publish',
'posts_per_page'=> -1,
'order' => 'ASC'
]);
//var_dump($otkatnye_gates);
while($otkatnye_gates->have_posts()):
$otkatnye_gates->the_post();
$gallery = get_post_meta(get_the_ID(), 'section_gates_gallery', true);
if($gallery):
$images = get_field('section_gates_gallery');
if( $images ): ?>
<div class="row section_gates_gallery">
<div class="col-xs-12">
<div id="sectiongates" class="sectiongates-carousel">
<?php foreach( $images as $image ): ?>
<div class="item">
<img src="<?php echo $image['sizes']['large']; ?>" alt="<?php echo $image['alt']; ?>" />
<button class="order-call" onclick="toggle(hidden_content2)">Заказать</button>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<?php endif; endif; ?>
<?php endwhile ?>
<?php wp_reset_query() ?>
<?php $section_gates = new WP_Query([
на зеркале файл 1 в 1 даже по хешу и все работает без вопросов