correct tag code
This commit is contained in:
@@ -222,6 +222,7 @@ function custom_wpseo_breadcrumb_output($output)
|
|||||||
function custom_pagination($query = null, $class = "pagination")
|
function custom_pagination($query = null, $class = "pagination")
|
||||||
{
|
{
|
||||||
global $wp_query;
|
global $wp_query;
|
||||||
|
|
||||||
$query = $query ?: $wp_query;
|
$query = $query ?: $wp_query;
|
||||||
$current_page = max(1, get_query_var('paged'));
|
$current_page = max(1, get_query_var('paged'));
|
||||||
$total_pages = $query->max_num_pages;
|
$total_pages = $query->max_num_pages;
|
||||||
|
|||||||
@@ -47,8 +47,11 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
|||||||
<!-- End Google Tag Manager (noscript) -->
|
<!-- End Google Tag Manager (noscript) -->
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
<? if ( !is_tag() ):?>
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
|
<?else:?>
|
||||||
|
<body>
|
||||||
|
<?endif?>
|
||||||
<?php wp_body_open(); ?>
|
<?php wp_body_open(); ?>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<?if (function_exists('krutilka_placement')):?>
|
<?if (function_exists('krutilka_placement')):?>
|
||||||
|
|||||||
5
tag.php
5
tag.php
@@ -13,7 +13,7 @@
|
|||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'posts_per_page' => 13,
|
'posts_per_page' => 13,
|
||||||
'paged' => $paged,
|
'paged' => $paged,
|
||||||
'tag_id' => get_queried_object_id() // Используем tag_id вместо category__in
|
'tag_id' => get_queried_object_id(), // Используем tag_id вместо category__in
|
||||||
);
|
);
|
||||||
$query = new WP_Query($args);
|
$query = new WP_Query($args);
|
||||||
|
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php custom_pagination(); ?>
|
<?php custom_pagination( $query );
|
||||||
|
wp_reset_postdata();?>
|
||||||
</div>
|
</div>
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
Reference in New Issue
Block a user