2024-06-11 12:54:22 +03:00
|
|
|
|
<?php get_header(); ?>
|
2024-03-12 09:16:19 +03:00
|
|
|
|
<div class="content-middle articles-wrapper">
|
2024-06-11 12:54:22 +03:00
|
|
|
|
<?php get_template_part('partials/rubrics-mobile'); ?>
|
|
|
|
|
|
<div class="section-title desktop">
|
|
|
|
|
|
<?php if (is_category()) : ?>
|
|
|
|
|
|
<h1 class="section-title__title"><?= get_queried_object()->name ?></h1>
|
|
|
|
|
|
<?php endif; ?>
|
2024-03-12 09:16:19 +03:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="articles-preview">
|
2024-06-11 12:54:22 +03:00
|
|
|
|
<?php
|
|
|
|
|
|
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;
|
|
|
|
|
|
$counter = 0;
|
|
|
|
|
|
$args = array(
|
|
|
|
|
|
'post_type' => 'post',
|
|
|
|
|
|
'posts_per_page' => 10,
|
|
|
|
|
|
'paged' => $paged,
|
|
|
|
|
|
'category__in' => get_queried_object_id()
|
|
|
|
|
|
);
|
|
|
|
|
|
$query = new WP_Query($args);
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
<? if ($query->have_posts()) : ?>
|
|
|
|
|
|
<? while ($query->have_posts()) : $query->the_post(); ?>
|
2024-03-12 09:16:19 +03:00
|
|
|
|
<? $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(); ?>
|
2024-06-11 12:54:22 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<?php custom_pagination(); ?>
|
2024-03-12 09:16:19 +03:00
|
|
|
|
</div>
|
2024-06-11 12:54:22 +03:00
|
|
|
|
<?php get_footer(); ?>
|