2024-03-01 17:47:03 +03:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
$args = array(
|
|
|
|
|
|
'posts_per_page' => 10, // Количество постов для вывода
|
|
|
|
|
|
'post_type' => 'post', // Тип постов для выборки (например, 'post', 'page', 'custom_post_type')
|
|
|
|
|
|
'orderby' => 'date', // Сортировка по дате
|
|
|
|
|
|
'order' => 'DESC', // Направление сортировки (DESC - по убыванию, ASC - по возрастанию)
|
|
|
|
|
|
'category_name' => get_queried_object()->slug
|
|
|
|
|
|
);
|
|
|
|
|
|
$counter = 0;
|
2024-03-12 09:16:19 +03:00
|
|
|
|
query_posts($args);
|
2024-03-01 17:47:03 +03:00
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
<?php get_header() ?>
|
2024-03-12 09:16:19 +03:00
|
|
|
|
<div class="content-middle articles-wrapper">
|
2024-03-01 17:47:03 +03:00
|
|
|
|
|
2024-03-12 09:16:19 +03:00
|
|
|
|
<? get_template_part('partials/rubrics-mobile'); ?>
|
|
|
|
|
|
<div class="section-title border-top">
|
|
|
|
|
|
<h1 class="section-title__title"><?= get_queried_object()->name ?></h1>
|
|
|
|
|
|
</div>
|
2024-03-01 17:47:03 +03:00
|
|
|
|
|
2024-03-12 09:16:19 +03:00
|
|
|
|
<div class="articles-preview">
|
|
|
|
|
|
<? if (have_posts()) : ?>
|
|
|
|
|
|
<? while (have_posts()) : the_post(); ?>
|
|
|
|
|
|
<? $counter++;
|
|
|
|
|
|
$formatted_date = format_event_date(); ?>
|
2024-03-01 17:47:03 +03:00
|
|
|
|
<a href="<? the_permalink(); ?>">
|
|
|
|
|
|
<div class="article-item">
|
|
|
|
|
|
<div class="interview-item__image-container">
|
|
|
|
|
|
<?= show_post_image(); ?>
|
|
|
|
|
|
<button class="item-video__button subtitle-20">
|
2024-03-12 09:16:19 +03:00
|
|
|
|
<img src="<?= get_asset('icons/play.svg') ?>" alt="" /> Интервью
|
2024-03-01 17:47:03 +03:00
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="article-item__text">
|
|
|
|
|
|
<div class="article-time">
|
2024-03-12 09:16:19 +03:00
|
|
|
|
<img src="<?= get_asset('icons/time.svg') ?>" alt="" />
|
2024-03-01 17:47:03 +03:00
|
|
|
|
<time><?= $formatted_date; ?></time>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<a href="<? the_permalink(); ?>" class="subtitle-16 article-item__link">
|
|
|
|
|
|
<?= the_title() ?>
|
|
|
|
|
|
</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</a>
|
2024-03-12 09:16:19 +03:00
|
|
|
|
<? endwhile; ?>
|
|
|
|
|
|
<? if ($counter == 4) : ?>
|
|
|
|
|
|
<div class="banner-middle desktop">
|
|
|
|
|
|
<?php if (function_exists('banners_conf_display')) banners_conf_display('content_banner_desktop'); ?>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="banner-middle mobile">
|
|
|
|
|
|
<?php if (function_exists('banners_conf_display')) banners_conf_display('content_banner_mobile'); ?>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<? endif; ?>
|
|
|
|
|
|
<? endif; ?>
|
|
|
|
|
|
<a href="<?= home_url(); ?>" class="articles-preview__show-next mobile">На главную</a>
|
2024-03-01 17:47:03 +03:00
|
|
|
|
</div>
|
2024-03-12 09:16:19 +03:00
|
|
|
|
<? custom_pagination(); ?>
|
|
|
|
|
|
</div>
|
2024-03-01 17:47:03 +03:00
|
|
|
|
<?php
|
|
|
|
|
|
get_footer() ?>
|