61 lines
2.4 KiB
PHP
61 lines
2.4 KiB
PHP
<section class="ent <?php
|
||
if( is_home()){
|
||
echo 'wave';
|
||
}else if (is_page(24)){
|
||
echo 'wave wave-no-bottom';
|
||
}
|
||
?>">
|
||
<div class="ent-container">
|
||
<h2>Все развлечения</h2>
|
||
<div class="owl-carousel ent-slider container">
|
||
<!-- Выводи список квестов -->
|
||
<?php
|
||
$posts = get_posts( array(
|
||
'category' => 0,
|
||
'orderby' => 'date',
|
||
'order' => 'ASC',
|
||
'include' => array(),
|
||
'exclude' => array(),
|
||
'meta_key' => '',
|
||
'meta_value' =>'',
|
||
'post_type' => 'armanty_quests',
|
||
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||
) );
|
||
|
||
foreach( $posts as $post ){
|
||
setup_postdata($post);?>
|
||
<div class="ent-container__quest" style="background: url('<?php echo the_post_thumbnail_url() ?>'); background-size: cover">
|
||
<div class="ent-container__quest-overlay"></div>
|
||
<div class="ent-container__quest-content">
|
||
<div>
|
||
<h3><?php the_title();?></h3>
|
||
<p><?php the_excerpt();?></p>
|
||
<div class="quest-description__icons_main">
|
||
<div class="quest-people">
|
||
<img src="<?php echo get_template_directory_uri() ?>/assets//img/quests/quest-people-big-white.svg" alt="">
|
||
<span><?php the_field('quest_players_min')?>-<?php the_field('quest_players_max')?> игроков</span>
|
||
</div>
|
||
<div class="quest-time">
|
||
<img src="<?php echo get_template_directory_uri() ?>/assets//img/quests/quest-time-big-white.svg" alt="">
|
||
<span><?php the_field('quests_time')?> минут</span>
|
||
</div>
|
||
<div class="quest-age">
|
||
<img src="<?php the_field('quests_age')?>" alt="">
|
||
<!-- <i class="fa fa-child" aria-hidden="true"></i> -->
|
||
<!-- <span><?php echo the_field('quest_level'); ?> из 5</span> -->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<a href="<?php echo the_permalink(); ?>"><button>Подробнее</button></a>
|
||
</div>
|
||
|
||
</div>
|
||
<?php
|
||
}
|
||
?>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|