2024-04-04 21:01:26 +03:00
|
|
|
|
<?php get_header(); ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?php if (in_category('events')) : ?>
|
|
|
|
|
|
<?php get_template_part('single-events'); ?>
|
|
|
|
|
|
<? else : ?>
|
|
|
|
|
|
<div class="content-middle articles-wrapper">
|
|
|
|
|
|
<?php get_template_part('partials/rubrics-mobile'); ?>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="article-single">
|
|
|
|
|
|
<div class="article-time article-single__time">
|
|
|
|
|
|
<?php if (!in_category('partners')) : ?>
|
|
|
|
|
|
<img src="<?= get_asset('/icons/time.svg'); ?>" alt="" />
|
|
|
|
|
|
<?php
|
|
|
|
|
|
$formatted_date = format_event_date();
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
<?= $formatted_date; ?>
|
|
|
|
|
|
<? endif; ?>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<?php if (!in_category('partners')) : ?>
|
|
|
|
|
|
<div class="article-single__tag"><?=get_category_name(); ?></div>
|
|
|
|
|
|
<? endif; ?>
|
|
|
|
|
|
<h1 class="article-single__title">
|
|
|
|
|
|
<?php the_title(); ?>
|
|
|
|
|
|
</h1>
|
|
|
|
|
|
<?php
|
|
|
|
|
|
$author = get_userdata(get_post_field('post_author'));
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
<?php if (!in_category('partners')) : ?>
|
2024-06-27 19:30:17 +03:00
|
|
|
|
<?php if ( $author AND $author->display_name !== 'agroexpert.press' AND $author->display_name !== 'Анна Купровская') : ?>
|
2024-04-04 21:01:26 +03:00
|
|
|
|
<div class="article-author">
|
|
|
|
|
|
<div class="article-author__name">
|
2025-02-26 20:30:02 +03:00
|
|
|
|
<a href="<?= get_author_posts_url($author->ID); ?>">
|
|
|
|
|
|
<?= $author->display_name; ?></a><br>
|
2024-04-04 21:01:26 +03:00
|
|
|
|
<? if ( $author->description !== '' ):?>
|
|
|
|
|
|
<?=$author->description?>
|
|
|
|
|
|
<?endif?>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
<div class="article-single__content">
|
2025-04-18 19:44:26 +03:00
|
|
|
|
<?php
|
|
|
|
|
|
//$content = get_the_content();
|
|
|
|
|
|
$content = apply_filters('the_content', get_the_content());
|
|
|
|
|
|
echo replace_first_figure_in_content($content);
|
|
|
|
|
|
//the_content(); ?>
|
2024-04-04 21:01:26 +03:00
|
|
|
|
<div class="article-social">Подписывайтесь на нас в <a href="https://dzen.ru/agroexpert_press?favid=254170145" target="_blank">Дзен</a> и <a href="https://t.me/agroexpert_press" target="_blank">Telegram</a></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2024-05-06 12:02:48 +03:00
|
|
|
|
|
2024-05-22 21:02:50 +03:00
|
|
|
|
<?php // get_template_part('partials/rtb-single'); ?>
|
|
|
|
|
|
|
2024-04-04 21:01:26 +03:00
|
|
|
|
<?php get_template_part('partials/featured-posts'); ?>
|
|
|
|
|
|
<?php if (!in_category('partners')) : ?>
|
|
|
|
|
|
<?php get_template_part('partials/related-posts'); ?>
|
|
|
|
|
|
<? else : ?>
|
|
|
|
|
|
<div class="section-title">
|
|
|
|
|
|
<h2 class="section-title__title subtitle-18">Еще по теме</h2>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="suggestion-container">
|
|
|
|
|
|
<?
|
|
|
|
|
|
$args = [
|
|
|
|
|
|
'category_name' => 'partners',
|
|
|
|
|
|
'post_status' => 'publish',
|
|
|
|
|
|
'order' => 'ASC',
|
|
|
|
|
|
'posts_per_page' => 4
|
|
|
|
|
|
];
|
|
|
|
|
|
$posts = get_posts($args);
|
|
|
|
|
|
$counter = 0;
|
|
|
|
|
|
foreach ($posts as $post) : ?>
|
|
|
|
|
|
<div class="suggestion-item">
|
|
|
|
|
|
<a href="<?= the_permalink() ?>">
|
|
|
|
|
|
<h3 class="subtitle-16"> <?= the_title() ?></h3>
|
|
|
|
|
|
</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<? endforeach; ?>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<? endif; ?>
|
|
|
|
|
|
<a href="<?= home_url(); ?>" class="articles-preview__show-next desktop">На главную</a>
|
|
|
|
|
|
<div class="articles__spacer-container">
|
|
|
|
|
|
<div class="articles__spacer"></div>
|
|
|
|
|
|
<div class="articles__spacer"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<? endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?php get_footer(); ?>
|