correct tag.php
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
add_filter('category_template', function($template) {
|
||||
|
||||
if ( !is_category() ){
|
||||
return $template;
|
||||
}
|
||||
|
||||
$current_category = get_queried_object();
|
||||
|
||||
if ( $current_category->slug == 'rfo' ) {
|
||||
|
||||
@@ -15,7 +15,7 @@ $title = isset($args['title']) ? $args['title'] : 'РФО';
|
||||
$style = isset($args['style']) ? $args['style'] : 0;
|
||||
$posts_count = isset($args['posts_count']) ? $args['posts_count'] : 1;
|
||||
?>
|
||||
|
||||
<pre><?=$category?></pre>
|
||||
<div class="custom-category-block" data-category="<?php echo esc_attr($category); ?>">
|
||||
<?php
|
||||
$query_args = array(
|
||||
|
||||
6
tag.php
6
tag.php
@@ -1,8 +1,8 @@
|
||||
<?php get_header(); ?>
|
||||
<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">
|
||||
<?php if (is_category()) : ?>
|
||||
<?php if (is_tag()) : ?>
|
||||
<h1 class="section-title__title"><?= get_queried_object()->name ?></h1>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -13,7 +13,7 @@
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => 13,
|
||||
'paged' => $paged,
|
||||
'category__in' => get_queried_object_id()
|
||||
'tag_id' => get_queried_object_id() // Изменили category__in на tag_id
|
||||
);
|
||||
$query = new WP_Query($args);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user