<!-- Карточки Начало цикла-->
<?php $penis = get_the_ID(); ?>
<?php
$sort = $_COOKIE["catalog_sort"];
$show_count = (int)$_COOKIE["catalog_show_count"];
$sort = str_replace('\\', "", $sort);
$sort = json_decode($sort, true);
if(!$show_count)
$show_count = 24;
$queryArr = array(
'post_type' => 'page',
'post_parent' => $penis,
'meta_query' => array(
"template" => array(
"key" => "_wp_page_template",
"value" => "templates/catalogue_detail.php",
"type" => 'NUMERIC'
),
),
'paged' => $currPage,
'posts_per_page' => $show_count,
'order' => strtoupper($sort["type"]),
);
if($sort)
{
switch ($sort["by"]) {
case 'alphabet':
$queryArr["orderby"] = "title";
break;
case 'price':
$queryArr["meta_key"] = "item_price";
$queryArr["orderby"] = "meta_value_num";
break;
}
}
$query = new WP_Query( $queryArr );
while ($query->have_posts()) : $query->the_post();?>
<?php $aidi = get_the_ID(); ?>
<section class="section timetable">
<div class="section__top section__top_page contacts__top" style="background-image: url('<?php the_field( "картинкарррррррррр" );?>')">
<div class="section__content"></div>
<svg class="section__triangle" viewbox="0 0 1000 105" preserveaspectration="none">
<polygon class="section__polygon" points="0,10 0,105 800,105 800,120"></polygon>
<polygon class="section__polygon" points="1000,0 1000,105 500,105 500,85"></polygon>
</svg>
</div>
<div class="section__bottom graphics__bottom graphics__bottom_padding">
<div class="section__wrapper courses__bg">
<div class="section__content section__content_min">
<div class="courses__wrap">
<h1 class="section__img-desc section__img-desc_black"><?php the_title()?></h1>
</div>
</div>
</div>
<div class="section__content">
<ul class="section__list courses__display">
<li class="section__item courses__item courses__item_one">
<div class="section__item-wrap graphics__item">
<div class="section__img">
<div class="section__img-pic" style="background-image: url('<?php the_post_thumbnail_url() ?>')"></div>
<div class="section__img-desc courses__img-desc"><?php the_title()?></div>
</div>
<div class="section__desc">
<div class="courses__desc-wrap">
<div class="courses__text section__text"><?php the_content(); ?></div>
<div class="courses__num-lesson courses__title-num_darken"><?php the_field( "urokiaaa" );?></div>
</div>
<div class="section__controls"><a class="courses__btn section__btn section__btn_darken" href="<?php the_permalink(); ?>">подробнее</a></div>
</div>
</div>
</li>
</ul>
</div> </div>
</section>
<?php
endwhile;
wp_reset_query();
?>
<!-- Конец цикла -->