Untitled
unknown
plain_text
2 years ago
813 B
11
Indexable
<div class="product-carousel">
<?php
$products = get_field('produkty_tiktok')['produkty'];
if ($products) {
$args = array(
'tax_query' => array(
array(
'taxonomy' => 'product_visibility',
'terms' => array('exclude-from-catalog'),
'operator' => 'IN',
),
),
);
$product_posts = get_posts($args);
if ($product_posts) {
foreach ($product_posts as $post) {
setup_postdata($GLOBALS['post'] = $post);
wc_get_template_part('content', 'product');
wp_reset_postdata();
}
} else {
echo __('No products found');
}
}
?>
</div>Editor is loading...