new format author and date

This commit is contained in:
argoexpert press
2025-07-25 21:05:36 +03:00
parent 6fab76bf4b
commit 3207928a5c
4 changed files with 34 additions and 16 deletions

View File

@@ -6,6 +6,15 @@
<h1 class="section-title__title"><?= get_the_author(); ?></h1>
</div>
<?php if (!is_paged()) {
$author_description = get_the_author_meta('description');
if (!empty($author_description)) {
echo '<div class="article-item__text">';
echo nl2br(esc_html($author_description));
echo '</div>';
}
}?>
<div class="articles-preview">
<?php
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;

View File

@@ -18,29 +18,36 @@
'3' => [
'name' => 'Юлия Макеева',
'position' => 'Редактор сайта',
'position' => 'директор по медиапродуктам',
'image' => 'https://vetandlife.ru/wp-content/uploads/2021/12/makeeva.png'
],
'4' => [
'name' => 'Александра Рыжкова',
'position' => 'замдиректора по медиапродуктам',
'image' => 'https://agroexpert.press/wp-content/uploads/2025/07/aleksandra-ryzhkova.jpg'
],
'5' => [
'name' => 'Елена Орехова',
'position' => 'Заместитель редактора',
'position' => 'Редактор сайта',
'image' => 'https://agroexpert.press/wp-content/uploads/2024/04/orexova.jpg'
],
'5' => [
'6' => [
'name' => 'Елена Каримова',
'position' => 'Научный обозреватель',
'image' => 'https://agroexpert.press/wp-content/uploads/2024/04/karimova.jpg'
],
'6' => [
'7' => [
'name' => 'Ильяс Левашов',
'position' => 'Автор',
'image' => 'https://vetandlife.ru/wp-content/uploads/2024/04/iilyas-levashov.jpg'
],
'7' => [
'8' => [
'name' => 'Юлия Ликарчук',
'position' => 'Автор',
'image' => 'https://vetandlife.ru/wp-content/uploads/2021/12/likarchyk.png'

View File

@@ -19,6 +19,10 @@
display: none;
}
.byline{
margin-bottom: 1.2rem;
}
@media (max-width: 1024px) {
}

View File

@@ -13,8 +13,9 @@
<?php
$formatted_date = format_event_date();
?>
<?= $formatted_date; ?>
<time datetime="<?php echo get_the_date('c'); ?>">
<?= $formatted_date; ?>
</time>
<? endif; ?>
</div>
<?php if (!in_category('partners')) : ?>
@@ -29,15 +30,12 @@
<?php if (!in_category('partners')) : ?>
<?php if ( $author AND $author->display_name !== 'agroexpert.press' AND $author->display_name !== 'Анна Купровская') : ?>
<div class="article-author">
<div class="article-author__name">
<p class="byline">
Автор&nbsp;<span class="article-author__name">
<a href="<?= get_author_posts_url($author->ID); ?>">
<?= $author->display_name; ?></a><br>
<? if ( $author->description !== '' ):?>
<?=$author->description?>
<?endif?>
</div>
</div>
<?=$author->display_name; ?></a>
</span>
</p>
<?php endif; ?>
<?php endif; ?>
<div class="article-single__content">