correct rubrics rfo
This commit is contained in:
@@ -5,18 +5,21 @@
|
|||||||
<div class="rfo-rubrics-line">
|
<div class="rfo-rubrics-line">
|
||||||
|
|
||||||
<?php get_template_part('rfo/category-end', null, [
|
<?php get_template_part('rfo/category-end', null, [
|
||||||
'category' => 'rfo', // slug рубрики
|
'category' => 'opinion', // slug рубрики
|
||||||
'style' => 'item-rfo-zh'
|
'style' => '',
|
||||||
|
'title' => 'Интервью'
|
||||||
]);?>
|
]);?>
|
||||||
|
|
||||||
<?php get_template_part('rfo/category-end', null, [
|
<?php get_template_part('rfo/category-end', null, [
|
||||||
'category' => 'rfo', // slug рубрики
|
'category' => 'fumigation', // slug рубрики
|
||||||
'style' => 'item-rfo-zel'
|
'style' => 'item-rfo-zh',
|
||||||
|
'title' => 'Фумигация'
|
||||||
]);?>
|
]);?>
|
||||||
|
|
||||||
<?php get_template_part('rfo/category-end', null, [
|
<?php get_template_part('rfo/category-end', null, [
|
||||||
'category' => 'rfo', // slug рубрики
|
'category' => 'zashchita-rasteniy', // slug рубрики
|
||||||
'style' => 'item-rfo-zh'
|
'style' => 'item-rfo-zel',
|
||||||
|
'title' => 'Защита растений'
|
||||||
]);?>
|
]);?>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
34
tag_old.php
Normal file
34
tag_old.php
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?php get_header(); ?>
|
||||||
|
<div class="content-middle articles-wrapper">
|
||||||
|
<?php get_template_part('partials/rubrics-mobile'); ?>
|
||||||
|
<div class="section-title desktop">
|
||||||
|
<?php if (is_tag()) : ?>
|
||||||
|
<h1 class="section-title__title"><?= single_tag_title('', false) ?></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' => 13,
|
||||||
|
'paged' => $paged,
|
||||||
|
'tag_id' => get_queried_object_id() // Используем tag_id вместо category__in
|
||||||
|
);
|
||||||
|
$query = new WP_Query($args);
|
||||||
|
|
||||||
|
// Передаем query через глобальную переменную $wp_query, чтобы избежать ошибки
|
||||||
|
global $wp_query;
|
||||||
|
$original_query = $wp_query;
|
||||||
|
$wp_query = $query;
|
||||||
|
|
||||||
|
get_template_part('partials/post-list');
|
||||||
|
|
||||||
|
// Восстанавливаем оригинальный запрос
|
||||||
|
$wp_query = $original_query;
|
||||||
|
wp_reset_postdata();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php custom_pagination(); ?>
|
||||||
|
</div>
|
||||||
|
<?php get_footer(); ?>
|
||||||
Reference in New Issue
Block a user