82 lines
3.0 KiB
PHP
82 lines
3.0 KiB
PHP
<div class="discount">
|
|
<h2>Скидки и акции</h2>
|
|
<div class="owl-carousel discount-slider">
|
|
|
|
<?php
|
|
$posts = get_posts( array(
|
|
'category' => 0,
|
|
'orderby' => 'date',
|
|
'order' => 'DESC',
|
|
'include' => array(),
|
|
'exclude' => array(),
|
|
'meta_key' => '',
|
|
'meta_value' =>'',
|
|
'post_type' => 'armanty_discounts',
|
|
'posts_per_page' => 99,
|
|
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
|
) );
|
|
foreach( $posts as $post ){
|
|
setup_postdata($post);?>
|
|
|
|
<div class="discount-item">
|
|
<div class="discount-item__badge">
|
|
<span><?php the_title()?></span>
|
|
</div>
|
|
<div class="discount-item__content" style="background-color: <?php the_field('armanty_discount_color')?>">
|
|
<img src="<?php echo the_post_thumbnail_url() ?>" alt="sale">
|
|
<?php the_excerpt() ?>
|
|
<div>
|
|
<button class="btn btn-danger btn-round">Подробнее</button>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="discount-modal">
|
|
<div class="discount-modal-layout"></div>
|
|
<div class="discount-modal-wrapper">
|
|
<div class="discount-modal-close"><span>Закрыть ×</span></div>
|
|
<div class="discount-modal-slider-nav discount-modal-slider-nav-prev"><i class="fa fa-chevron-left" aria-hidden="true"></i></div>
|
|
<div class="discount-modal-slider-nav discount-modal-slider-nav-next"><i class="fa fa-chevron-right" aria-hidden="true"></i></div>
|
|
<div class="owl-carousel discount-modal-slider">
|
|
|
|
<?php
|
|
$posts = get_posts( array(
|
|
'category' => 0,
|
|
'orderby' => 'date',
|
|
'order' => 'DESC',
|
|
'include' => array(),
|
|
'exclude' => array(),
|
|
'meta_key' => '',
|
|
'meta_value' =>'',
|
|
'post_type' => 'armanty_discounts',
|
|
'posts_per_page' => 99,
|
|
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
|
) );
|
|
|
|
foreach( $posts as $post ){
|
|
setup_postdata($post);?>
|
|
<div class="discount-modal-slider-item">
|
|
<div class="discount-modal-slider-item-badge"><?php the_title()?></div>
|
|
<div class="discount-modal-slider-item__img" style="background: <?php the_field('armanty_discount_color')?>;">
|
|
<img src="<?php echo the_post_thumbnail_url() ?>" alt="">
|
|
</div>
|
|
<div class="discount-modal-slider-item__text">
|
|
<div>
|
|
<?php the_content(); ?>
|
|
</div>
|
|
<a href="<?php echo get_home_url() . '/form'?>"><button class="btn btn-danger btn-round">Забронировать</button></a>
|
|
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
</div>
|