update to ver 3-09-25
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<?php get_header(); ?>
|
<?php get_header( 'rfo' ); ?>
|
||||||
|
|
||||||
<div class="content-middle articles-wrapper">
|
<div class="content-middle articles-wrapper">
|
||||||
<?php get_template_part('partials/rubrics-mobile'); ?>
|
<?php get_template_part('partials/rubrics-mobile'); ?>
|
||||||
<div class="section-title desktop">
|
<div class="section-title desktop">
|
||||||
@@ -8,21 +9,22 @@
|
|||||||
$title = !empty($category) ? $category[0]->name : get_the_title();
|
$title = !empty($category) ? $category[0]->name : get_the_title();
|
||||||
?>
|
?>
|
||||||
<h1 class="section-title__title"><?= $title ?></h1>
|
<h1 class="section-title__title"><?= $title ?></h1>
|
||||||
|
<h1><?php post_type_archive_title(); ?></h1>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="articles-preview">
|
<div class="articles-preview">
|
||||||
<?php
|
<?php
|
||||||
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;
|
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;
|
||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'post',
|
'post_type' => 'spravochniki',
|
||||||
'posts_per_page' => 10,
|
'posts_per_page' => 10,
|
||||||
'paged' => $paged
|
'paged' => $paged
|
||||||
);
|
);
|
||||||
$query = new WP_Query($args);
|
$query = new WP_Query($args);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php get_template_part('partials/post-list', null, ['query' => $wp_query]); ?>
|
<?php //get_template_part('partials/post-list', null, ['query' => $wp_query]); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php custom_pagination(); ?>
|
<?php //custom_pagination(); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php get_footer(); ?>
|
<?php get_footer( 'rfo' ) ; ?>
|
||||||
|
|||||||
10
archive.php
10
archive.php
@@ -5,8 +5,18 @@ error_reporting(E_ALL);
|
|||||||
ini_set('display_errors', 1);
|
ini_set('display_errors', 1);
|
||||||
ini_set('display_startup_errors', 1);
|
ini_set('display_startup_errors', 1);
|
||||||
|
|
||||||
|
|
||||||
// Ваш код...
|
// Ваш код...
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$qo = get_queried_object();
|
||||||
|
echo '<pre>';
|
||||||
|
print_r($qo);
|
||||||
|
echo '</pre>';
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
<div class="content-middle articles-wrapper">
|
<div class="content-middle articles-wrapper">
|
||||||
<?php get_template_part('partials/rubrics-mobile'); ?>
|
<?php get_template_part('partials/rubrics-mobile'); ?>
|
||||||
<div class="section-title desktop">
|
<div class="section-title desktop">
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ $extensionToClassMap = [
|
|||||||
<div class="advert-item__block">
|
<div class="advert-item__block">
|
||||||
<?
|
<?
|
||||||
$advertisers->the_post();
|
$advertisers->the_post();
|
||||||
the_content();
|
//the_content();
|
||||||
$documents = get_field('documents');
|
$documents = get_field('documents');
|
||||||
$documents = array_filter($documents, function($item) {
|
$documents = array_filter($documents, function($item) {
|
||||||
return isset($item['document']) && $item['document'] !== false;
|
return isset($item['document']) && $item['document'] !== false;
|
||||||
@@ -38,6 +38,25 @@ $extensionToClassMap = [
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
|
|
||||||
|
<div class="article-single__content">
|
||||||
|
<p><strong>Кто мы?</strong></p>
|
||||||
|
<p>Федеральное деловое издание «Агроэксперт» входит в медиагруппу «Да Винчи Медиа», одну из ведущих отраслевых медиагрупп в России.</p>
|
||||||
|
<p><strong>В чем наше преимущество?</strong></p>
|
||||||
|
<p>Мы — единственное среди аграрных СМИ федеральное издание с собственным видеопродакшеном. Это позволяет запускать проекты полного цикла — от стратегии и креатива до производства и дистрибуции.</p>
|
||||||
|
<p><strong>Какие форматы доступны?</strong></p>
|
||||||
|
<p>Спецпроекты, нативные материалы, печатные публикации, digital-размещения, видео (съемка/постпродакшен), e-mail и соцсети, баннерные кампании, телеграм-интеграции, PR-поддержка.</p>
|
||||||
|
<p><strong>Работаете с мероприятиями?</strong></p>
|
||||||
|
<p>Да. Освещаем все отраслевые события и берем на себя информационное сопровождение мероприятий партнеров: анонс, пресс-офис, съемка/стрим, репортаж, пост-релиз.</p>
|
||||||
|
<p><strong>Бюджеты и сроки?</strong></p>
|
||||||
|
<p>Гибко — от разовых размещений до годовых программ. Базовые форматы — от 1 рабочего дня; спецпроекты и видео — от 2–3 недель.</p>
|
||||||
|
<p><strong>Как начать?</strong></p>
|
||||||
|
<p><a href="https://agroexpert.press/wp-content/uploads/2024/08/agroexpress_mediakit.pdf">Скачайте медиакит</a> или назначьте консультацию — подготовим предложение под ваши задачи и сроки.</p>
|
||||||
|
<p>Остались вопросы? Задавайте лично</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="advert-item__block">
|
<div class="advert-item__block">
|
||||||
<h2 class="advert-item__block-title_margin-lg subtitle-18">Контакты</h2>
|
<h2 class="advert-item__block-title_margin-lg subtitle-18">Контакты</h2>
|
||||||
<div class="advert-item__contacts">
|
<div class="advert-item__contacts">
|
||||||
@@ -46,10 +65,11 @@ $extensionToClassMap = [
|
|||||||
<div class="advert-item__contact-item">
|
<div class="advert-item__contact-item">
|
||||||
<!--<div class="advert-item__avatar-container"><img src="https://agroexpert.press/wp-content/uploads/2024/09/polovincev.jpg" alt="Илья Половинцев" class="advert-item__contacts-avatar"></div>-->
|
<!--<div class="advert-item__avatar-container"><img src="https://agroexpert.press/wp-content/uploads/2024/09/polovincev.jpg" alt="Илья Половинцев" class="advert-item__contacts-avatar"></div>-->
|
||||||
<div class="advert-item__contact-info">
|
<div class="advert-item__contact-info">
|
||||||
<p class="advert-item__contact-name subtitle-13">Елена Мишина</p>
|
<p class="advert-item__contact-name subtitle-13">Елена Мишина, директор по развитию</p><br>
|
||||||
<p class="advert-item__contact-position text-13">По вопросам рекламы</p>
|
<p class="advert-item__contact-name subtitle-13">Андрей Алексеев, менеджер по рекламе и спецпроектам</p><br>
|
||||||
<p class="advert-item__contact-phone subtitle-13">Тел: <a href="tel:79263663700"> +7 (926) 366 37 00</a></p>
|
<p class="advert-item__contact-phone subtitle-13">Тел/WhatApp: <a href="tel:79263663700"> +7 (926) 366 37 00</a></p>
|
||||||
<p class="advert-item__contact-email text-13"><a href="mailto:pr@agroexpert.press">pr@agroexpert.press</a></p>
|
<p class="advert-item__contact-email text-13"><a href="mailto:pr@agroexpert.press">pr@agroexpert.press</a></p>
|
||||||
|
<p class="advert-item__contact-email text-13"><a href="https://t.me/ad_vetandlife">@ad_vetandlife</a></p>
|
||||||
<div style="padding-top: 42px;"><a class="button" href="https://agroexpert.press/wp-content/uploads/2025/04/ae_kit_ed_250415_150204.pdf" target="_blank">Скачать медиакит</a></div>
|
<div style="padding-top: 42px;"><a class="button" href="https://agroexpert.press/wp-content/uploads/2025/04/ae_kit_ed_250415_150204.pdf" target="_blank">Скачать медиакит</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ import './styles/rfo/breadcrumbs.css';
|
|||||||
import './styles/rfo/landing.css';
|
import './styles/rfo/landing.css';
|
||||||
import './styles/rfo/interview.css';
|
import './styles/rfo/interview.css';
|
||||||
|
|
||||||
|
//spravochniki
|
||||||
|
import './styles/spravochniki/spravochniki.css';
|
||||||
|
|
||||||
import './scripts/calendar.js';
|
import './scripts/calendar.js';
|
||||||
import './scripts/menu-vertical.js';
|
import './scripts/menu-vertical.js';
|
||||||
|
|||||||
@@ -22,11 +22,29 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.featured-image {
|
.featured-image-dir-wrapper{
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
top: 6px; /* Отступ сверху */
|
||||||
|
left: 6px; /* Отступ слева */
|
||||||
|
right: 6px; /* Отступ справа */
|
||||||
|
bottom: 33px; /* Оставляем место внизу для photo-credit-tag */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.featured-image,
|
||||||
|
.featured-image-dir {
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.featured-image img {
|
.featured-image-dir {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center; /* Центрирует по горизонтали */
|
||||||
|
align-items: center; /* Центрирует по вертикали */
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.featured-image img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover; /* Заполняем область с сохранением пропорций */
|
object-fit: cover; /* Заполняем область с сохранением пропорций */
|
||||||
@@ -36,6 +54,10 @@
|
|||||||
filter: brightness(0.85);
|
filter: brightness(0.85);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.featured-image-dir img{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
.post-overlay {
|
.post-overlay {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 40px; /* Учитываем место для photo-credit-tag */
|
bottom: 40px; /* Учитываем место для photo-credit-tag */
|
||||||
@@ -72,7 +94,14 @@
|
|||||||
mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 288 199" preserveAspectRatio="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.79424 0L279.205 0C284.042 0 287.999 3.94986 287.999 8.77791V34.6476V164.353V190.222C287.999 195.05 284.042 199 279.205 199H115.707C109.54 199 108.385 195.144 105.499 190.222L99.3918 179.805C97.3825 176.378 93.1269 173.509 89.5588 173.13H8.79422C3.95661 173.13 0 169.181 0 164.352V8.77756C0 3.94951 3.95663 0 8.79424 0Z" fill="black"/></svg>');
|
mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 288 199" preserveAspectRatio="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.79424 0L279.205 0C284.042 0 287.999 3.94986 287.999 8.77791V34.6476V164.353V190.222C287.999 195.05 284.042 199 279.205 199H115.707C109.54 199 108.385 195.144 105.499 190.222L99.3918 179.805C97.3825 176.378 93.1269 173.509 89.5588 173.13H8.79422C3.95661 173.13 0 169.181 0 164.352V8.77756C0 3.94951 3.95663 0 8.79424 0Z" fill="black"/></svg>');
|
||||||
mask-repeat: no-repeat;
|
mask-repeat: no-repeat;
|
||||||
mask-size: 100% 100%;
|
mask-size: 100% 100%;
|
||||||
|
margin-bottom: 22px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.featured-image-dir img{
|
||||||
|
width: 200px;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -183,6 +183,7 @@
|
|||||||
.header__inner_rfo{
|
.header__inner_rfo{
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-rfo {
|
.menu-rfo {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
}
|
}
|
||||||
.search-container-rfo input {
|
.search-container-rfo input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 15px;
|
height: 40px;
|
||||||
padding: 10px 0px 10px 15px; /* Правое поле больше для иконки */
|
padding: 10px 0px 10px 15px; /* Правое поле больше для иконки */
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
|||||||
<nav class="nav header__nav">
|
<nav class="nav header__nav">
|
||||||
<?php get_template_part('partials/menu-primary'); ?>
|
<?php get_template_part('partials/menu-primary'); ?>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="lang-switch"><a href="<?php echo home_url();?>/en/">EN</a></div>
|
<!--<div class="lang-switch"><a href="<?php echo home_url();?>/en/">EN</a></div>-->
|
||||||
<div class="header__right">
|
<div class="header__right">
|
||||||
<div class="header__actions">
|
<div class="header__actions">
|
||||||
<a href="/search/?orderby=post_date&order=desc">
|
<a href="/search/?orderby=post_date&order=desc">
|
||||||
|
|||||||
@@ -1,6 +1,33 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
function agro_register_spravochniki_post_type() {
|
function agro_register_spravochniki_post_type() {
|
||||||
|
|
||||||
|
// Таксономия: рубрики справочников
|
||||||
|
register_taxonomy('spravochnik_category', 'spravochniki', [
|
||||||
|
'labels' => [
|
||||||
|
'name' => 'Категории справочников',
|
||||||
|
'singular_name' => 'Категория справочника',
|
||||||
|
'search_items' => 'Искать категории',
|
||||||
|
'all_items' => 'Все категории',
|
||||||
|
'parent_item' => 'Родительская категория',
|
||||||
|
'parent_item_colon' => 'Родительская категория:',
|
||||||
|
'edit_item' => 'Редактировать категорию',
|
||||||
|
'update_item' => 'Обновить категорию',
|
||||||
|
'add_new_item' => 'Добавить новую категорию',
|
||||||
|
'new_item_name' => 'Новое имя категории',
|
||||||
|
'menu_name' => 'Категории',
|
||||||
|
],
|
||||||
|
'public' => true,
|
||||||
|
'hierarchical' => true,
|
||||||
|
'rewrite' => [
|
||||||
|
'slug' => 'spravochniki/category',
|
||||||
|
'with_front' => false,
|
||||||
|
'hierarchical' => true
|
||||||
|
],
|
||||||
|
'show_admin_column' => true,
|
||||||
|
'show_in_rest' => true,
|
||||||
|
]);
|
||||||
|
|
||||||
register_post_type('spravochniki', [
|
register_post_type('spravochniki', [
|
||||||
'labels' => [
|
'labels' => [
|
||||||
'menu_name' => 'Справочники',
|
'menu_name' => 'Справочники',
|
||||||
@@ -16,38 +43,48 @@ function agro_register_spravochniki_post_type() {
|
|||||||
'not_found_in_trash' => 'В корзине не найдено',
|
'not_found_in_trash' => 'В корзине не найдено',
|
||||||
],
|
],
|
||||||
'public' => true,
|
'public' => true,
|
||||||
'has_archive' => false,
|
'has_archive' => 'spravochniki',
|
||||||
'rewrite' => true, // переопределим вручную
|
'hierarchical' => false, // Для записей обычно false
|
||||||
'hierarchical' => false,
|
'rewrite' => [
|
||||||
|
'slug' => 'spravochniki',
|
||||||
|
'with_front' => false,
|
||||||
|
'pages' => true
|
||||||
|
],
|
||||||
'supports' => ['title', 'editor', 'excerpt', 'thumbnail'],
|
'supports' => ['title', 'editor', 'excerpt', 'thumbnail'],
|
||||||
'taxonomies' => ['spravochnik_category'], // прикрепим свою таксономию
|
'taxonomies' => ['spravochnik_category'],
|
||||||
'show_in_rest' => true, // поддержка Gutenberg
|
'show_in_rest' => true,
|
||||||
'menu_icon' => 'dashicons-book-alt',
|
'menu_icon' => 'dashicons-book-alt',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Таксономия: рубрики справочников
|
|
||||||
register_taxonomy('spravochnik_category', 'spravochniki', [
|
|
||||||
'labels' => [
|
|
||||||
'name' => 'Справочники',
|
|
||||||
'singular_name' => 'Справочник',
|
|
||||||
'search_items' => 'Искать справочник',
|
|
||||||
'all_items' => 'Все справочники',
|
|
||||||
'parent_item' => 'Родительская рубрика',
|
|
||||||
'parent_item_colon' => 'Родительская рубрика:',
|
|
||||||
'edit_item' => 'Редактировать справочник',
|
|
||||||
'update_item' => 'Обновить справочник',
|
|
||||||
'add_new_item' => 'Добавить новый справочник',
|
|
||||||
'new_item_name' => 'Новое имя справочника',
|
|
||||||
'menu_name' => 'Справочники',
|
|
||||||
],
|
|
||||||
'public' => true,
|
|
||||||
'hierarchical' => true,
|
|
||||||
'rewrite' => false, // переопределим вручную
|
|
||||||
'show_in_rest' => true,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
add_action('init', 'agro_register_spravochniki_post_type');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
add_action('init', 'agro_register_spravochniki_post_type', 0); // Приоритет 0 для ранней регистрации
|
||||||
|
|
||||||
|
// 3. Правила перезаписи (упрощенные)
|
||||||
|
function agro_custom_rewrite_rules() {
|
||||||
|
// Главная страница справочников
|
||||||
|
add_rewrite_rule('^spravochniki/?$', 'index.php?post_type=spravochniki', 'top');
|
||||||
|
|
||||||
|
// Пагинация архива
|
||||||
|
add_rewrite_rule('^spravochniki/page/([0-9]+)/?$', 'index.php?post_type=spravochniki&paged=$matches[1]', 'top');
|
||||||
|
|
||||||
|
// Одиночные записи
|
||||||
|
add_rewrite_rule('^spravochniki/([^/]+)/?$', 'index.php?spravochniki=$matches[1]', 'top');
|
||||||
|
|
||||||
|
// Категории 1 уровня
|
||||||
|
add_rewrite_rule('^spravochniki/category/([^/]+)/?$', 'index.php?spravochnik_category=$matches[1]', 'top');
|
||||||
|
|
||||||
|
// Категории 2 уровня (иерархические)
|
||||||
|
add_rewrite_rule('^spravochniki/category/([^/]+)/([^/]+)/?$', 'index.php?spravochnik_category=$matches[2]', 'top');
|
||||||
|
}
|
||||||
|
add_action('init', 'agro_custom_rewrite_rules', 20);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Подзаголовок
|
// Подзаголовок
|
||||||
@@ -73,6 +110,7 @@ function agro_add_spravochnik_subtitle_meta_box() {
|
|||||||
add_action('add_meta_boxes', 'agro_add_spravochnik_subtitle_meta_box');
|
add_action('add_meta_boxes', 'agro_add_spravochnik_subtitle_meta_box');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function agro_spravochnik_subtitle_callback($post) {
|
function agro_spravochnik_subtitle_callback($post) {
|
||||||
$subtitle = get_post_meta($post->ID, '_spravochnik_subtitle', true);
|
$subtitle = get_post_meta($post->ID, '_spravochnik_subtitle', true);
|
||||||
echo '<input type="text" name="spravochnik_subtitle" value="' . esc_attr($subtitle) . '" style="width:100%;" />';
|
echo '<input type="text" name="spravochnik_subtitle" value="' . esc_attr($subtitle) . '" style="width:100%;" />';
|
||||||
@@ -86,5 +124,16 @@ function agro_save_spravochnik_subtitle($post_id) {
|
|||||||
add_action('save_post', 'agro_save_spravochnik_subtitle');
|
add_action('save_post', 'agro_save_spravochnik_subtitle');
|
||||||
|
|
||||||
|
|
||||||
|
add_action('pre_get_posts', 'modify_taxonomy_query');
|
||||||
|
function modify_taxonomy_query($query) {
|
||||||
|
// Только для главного запроса таксономии
|
||||||
|
if (!is_admin() && $query->is_main_query() && is_tax('spravochnik_category')) {
|
||||||
|
$query->set('posts_per_page', 9); // Ваш лимит
|
||||||
|
$query->set('orderby', 'title'); // Пример сортировки
|
||||||
|
$query->set('order', 'ASC'); // Пример порядка
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ if ($query->have_posts()) {
|
|||||||
$query->the_post();
|
$query->the_post();
|
||||||
|
|
||||||
if ( $post_counter == 1 ) :
|
if ( $post_counter == 1 ) :
|
||||||
get_template_part('content', 'post-main-rfo', ['full_width' => $post_count === 1, 'has_video' => $has_video ]);
|
//get_template_part('content', 'post-main-rfo', ['full_width' => $post_count === 1, 'has_video' => $has_video ]);
|
||||||
|
get_template_part('content', 'post-rfo', ['full_width' => $post_count === 1, 'has_video' => $has_video ]);
|
||||||
elseif ( $post_counter == 2) :
|
elseif ( $post_counter == 2) :
|
||||||
get_template_part('content', 'post-rfo', ['full_width' => $post_count === 1 && $large_first_image, 'has_video' => $has_video]);
|
get_template_part('content', 'post-rfo', ['full_width' => $post_count === 1 && $large_first_image, 'has_video' => $has_video]);
|
||||||
else:?>
|
else:?>
|
||||||
|
|||||||
@@ -1,49 +1,90 @@
|
|||||||
<?php get_header(); ?>
|
<?php get_header( 'rfo' ); ?>
|
||||||
|
|
||||||
<?php if (in_category('events')) : ?>
|
<div class="content-rfo">
|
||||||
<?php get_template_part('single-events'); ?>
|
|
||||||
<? else : ?>
|
<?php get_template_part('spravochniki/breadcrumbs'); ?>
|
||||||
<div class="content-middle articles-wrapper">
|
|
||||||
<?php get_template_part('partials/rubrics-mobile'); ?>
|
<h1 class="rfo__rubric"><?php the_title(); ?></h1>
|
||||||
|
|
||||||
<div class="article-single">
|
<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 class="featured-post">
|
||||||
|
<?if ( has_post_thumbnail() ) :?>
|
||||||
|
<div class="featured-image-dir-wrapper">
|
||||||
|
<div class="featured-image-dir">
|
||||||
|
<!--<img src="https://agroexpert.press/wp-content/uploads/2024/06/korma-proizvodstvo.jpg" />-->
|
||||||
|
<?php the_post_thumbnail(); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</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>
|
|
||||||
|
|
||||||
<div class="article-single__content">
|
<div class="photo-credit-tag">
|
||||||
|
<span><?the_post_thumbnail_caption()?></span>
|
||||||
|
</div>
|
||||||
|
<? endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="article-single--rfo">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="article-info--rfo">
|
||||||
|
|
||||||
|
<div class="article-info-element--rfo">
|
||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_362_2372)">
|
||||||
|
<circle cx="12" cy="12" r="9" stroke="#006842" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
<path d="M12 8V13.3333H16.3333" stroke="#006842" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_362_2372">
|
||||||
|
<rect width="24" height="24" fill="white" />
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
<div><?=calculate_reading_time()?> на прочтение</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="article-text--rfo">
|
||||||
<?php
|
<?php
|
||||||
//$content = get_the_content();
|
//$content = get_the_content();
|
||||||
$post_id = get_the_ID();
|
$post_id = get_the_ID();
|
||||||
if ( $post_id == 26011 ) {
|
|
||||||
the_content();
|
//echo replace_first_figure_in_content($content);
|
||||||
} else {
|
|
||||||
$content = apply_filters('the_content', get_the_content());
|
$content = apply_filters('the_content', get_the_content());
|
||||||
echo replace_first_figure_in_content($content);
|
echo delete_first_figure_in_content($content);?>
|
||||||
}
|
|
||||||
//the_content(); ?>
|
<div class="social-post--rfo">
|
||||||
<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 class="social-post-info--rfo">Подписывайтесь на нас в <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 class="social-post-icons--rfo">
|
||||||
|
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect width="36" height="36" rx="10" fill="white" />
|
||||||
|
<path d="M19.7357 19.7357C18.3214 21.195 18.2186 23.0143 18.0964 27C21.8121 27 24.3771 26.9871 25.7014 25.7014C26.9871 24.3771 27 21.69 27 18.0964C23.0143 18.225 21.195 18.3214 19.7357 19.7357ZM9 18.0964C9 21.69 9.01286 24.3771 10.2986 25.7014C11.6229 26.9871 14.1879 27 17.9036 27C17.775 23.0143 17.6786 21.195 16.2643 19.7357C14.805 18.3214 12.9857 18.2186 9 18.0964ZM17.9036 9C14.1943 9 11.6229 9.01286 10.2986 10.2986C9.01286 11.6229 9 14.31 9 17.9036C12.9857 17.775 14.805 17.6786 16.2643 16.2643C17.6786 14.805 17.7814 12.9857 17.9036 9ZM19.7357 16.2643C18.3214 14.805 18.2186 12.9857 18.0964 9C21.8121 9 24.3771 9.01286 25.7014 10.2986C26.9871 11.6229 27 14.31 27 17.9036C23.0143 17.775 21.195 17.6786 19.7357 16.2643Z" fill="black" />
|
||||||
|
<path d="M27 18.0964V17.9036C23.0143 17.775 21.195 17.6786 19.7357 16.2643C18.3214 14.805 18.2186 12.9857 18.0964 9H17.9036C17.775 12.9857 17.6786 14.805 16.2643 16.2643C14.805 17.6786 12.9857 17.7814 9 17.9036V18.0964C12.9857 18.225 14.805 18.3214 16.2643 19.7357C17.6786 21.195 17.7814 23.0143 17.9036 27H18.0964C18.225 23.0143 18.3214 21.195 19.7357 19.7357C21.195 18.3214 23.0143 18.2186 27 18.0964Z" fill="white" />
|
||||||
|
</svg>
|
||||||
|
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect width="36" height="36" rx="10" fill="white" />
|
||||||
|
<path d="M26.1 11.3418L23.3951 25.4628C23.3951 25.4628 23.0167 26.4419 21.977 25.9724L15.7361 21.0171L15.7072 21.0025C16.5502 20.2187 23.0872 14.1322 23.3729 13.8563C23.8151 13.429 23.5406 13.1747 23.027 13.4974L13.3711 19.8475L9.64587 18.5495C9.64587 18.5495 9.05963 18.3335 9.00323 17.864C8.94609 17.3937 9.66517 17.1393 9.66517 17.1393L24.8518 10.9699C24.8518 10.9699 26.1 10.4019 26.1 11.3418Z" fill="black" />
|
||||||
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php // get_template_part('partials/rtb-single'); ?>
|
<?php // get_template_part('partials/rtb-single'); ?>
|
||||||
|
|
||||||
<?php get_template_part('partials/featured-posts'); ?>
|
<?php get_template_part('partials/featured-posts'); ?>
|
||||||
<?php if (!in_category('partners')) : ?>
|
<?php if (!in_category('partners')) : ?>
|
||||||
<?php get_template_part('partials/related-posts'); ?>
|
<?php get_template_part('rfo/related-posts'); ?>
|
||||||
<? else : ?>
|
<? else : ?>
|
||||||
<div class="section-title">
|
<div class="section-title">
|
||||||
<h2 class="section-title__title subtitle-18">Еще по теме</h2>
|
<h2 class="section-title__title subtitle-18">Еще по теме</h2>
|
||||||
@@ -68,12 +109,14 @@
|
|||||||
<? endforeach; ?>
|
<? endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
<a href="<?= home_url(); ?>" class="articles-preview__show-next desktop">На главную</a>
|
<div class="article-show-next__rfo">
|
||||||
|
<a href="<?= home_url(); ?>/rfo">На главную</a>
|
||||||
|
</div>
|
||||||
<div class="articles__spacer-container">
|
<div class="articles__spacer-container">
|
||||||
<div class="articles__spacer"></div>
|
<div class="articles__spacer"></div>
|
||||||
<div class="articles__spacer"></div>
|
<div class="articles__spacer"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<? endif; ?>
|
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
|
||||||
|
<?php get_footer( 'rfo' ); ?>
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<?php get_header(); ?>
|
|
||||||
<div class="content-middle articles-wrapper">
|
|
||||||
<?php get_template_part('partials/rubrics-mobile'); ?>
|
|
||||||
<div class="section-title desktop">
|
|
||||||
<?php
|
|
||||||
if (is_category()):
|
|
||||||
$category = get_the_category();
|
|
||||||
$title = !empty($category) ? $category[0]->name : get_the_title();
|
|
||||||
?>
|
|
||||||
<h1 class="section-title__title"><?= $title ?></h1>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
<div class="articles-preview">
|
|
||||||
<?php
|
|
||||||
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;
|
|
||||||
$args = array(
|
|
||||||
'post_type' => 'post',
|
|
||||||
'posts_per_page' => 10,
|
|
||||||
'paged' => $paged
|
|
||||||
);
|
|
||||||
$query = new WP_Query($args);
|
|
||||||
|
|
||||||
?>
|
|
||||||
<?php get_template_part('partials/post-list', null, ['query' => $wp_query]); ?>
|
|
||||||
</div>
|
|
||||||
<?php custom_pagination(); ?>
|
|
||||||
</div>
|
|
||||||
<?php get_footer(); ?>
|
|
||||||
Reference in New Issue
Block a user