<div class="swiper-wrapper">
<?
$featured = new WP_Query(
array(
'posts_per_page' => 10,
'post_type' => 'product',
'orderby' => array('name' => 'ASC'),
'tax_query' => array(
array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'featured',
)
)
)
);
while($featured->have_posts()): $featured->the_post();?>
<?$product_id = get_the_ID();?>
<?$product = new WC_Product($product_id);?>
<div class="swiper-slide">
<div class="top_products_item">
<div class="top_products_img">
<a href="<?=$product->add_to_cart_url()?>">
<?=$product->get_image()?>
</a>
</div>
<div class="top_products_content">
<div class="top_products_title">
<a href="<?=$product->add_to_cart_url()?>"><?=$product->get_title()?></a>
</div>
<div class="top_products_price">от <?=$product->get_price()?> р.</div>
<a href="<?=$product->add_to_cart_url()?>" class="button">Оформить заказ</a>
</div>
</div>
</div>
<?endwhile;?>
<?wp_reset_postdata()?>
</div>
<div class='fixed'></div>
<style>
.fixed {
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
</style>