Есть цикл вывода товаров на страницу WP - в цикле есть ошибка, что не дает работать php коду Advanced Custom Fields после этого цикла.
Вот цикл
<?php
$loop = new WP_Query( array(
'post_type' => 'product',
'posts_per_page' => 3,
'orderby' => 'menu_order',
'order' => 'ASC',
));
while ( $loop->have_posts() ): $loop->the_post(); ?>
<div class="place__item place-item">
<div class="place-item__header">
<div class="place-item__image">
<?php the_post_thumbnail("thumbnail-215x300"); ?>
</div>
</div>
<div class="place-item__body">
<div class="place-item__title">
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</div>
<div class="place-item__price">
<p class="price">
<?php woocommerce_template_loop_price(); ?>
</p>
</div>
<div class="place-item__info"><?php woocommerce_template_single_excerpt(); ?></div>
<div class="place_quantity_custom">
<div class="product__quantity">
<button class="product__quantity_minus" id="product__quantity_minus" data-id-product="<?php echo get_the_ID(); ?>"> - </button>
<input class="product__quantity_field input_quantity_<?php echo get_the_ID(); ?>" id="product__quantity_field" type="number" min="1" max="999" step="1" name="quantity" value="1">
<button class="product__quantity_plus" id="product__quantity_plus" data-id-product="<?php echo get_the_ID(); ?>"> + </button>
</div>
</div>
<div class="place-item__buttons">
<div id="change_quantity_<?php echo get_the_ID(); ?>" class="place-item__button">
<?php woocommerce_template_loop_add_to_cart(); ?>
</div>
</div>
</div>
</div>
<?php endwhile; ?>