-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive.php
More file actions
38 lines (29 loc) · 1.09 KB
/
Copy patharchive.php
File metadata and controls
38 lines (29 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
get_header('blog');
$currentCat = 0;
$current = get_queried_object();
if ($current instanceof WP_Term) $currentCat = $current->term_id;
$isTag = $current->taxonomy == 'post_tag';
$axParam = ['page_num' => 1];
$axParam[ ($isTag ? 'tags' : 'cats') ] = [$currentCat];
?>
<template class="is-active" data-catid="<?=$currentCat; ?>"></template>
<main class="blogcategory">
<div class="container">
<a href="/blog/" class="blogpost__back button button--blog">
<img src="<?= imgs(); ?>/blog/icon-slider-arrow.svg" alt="">
<span>Назад</span>
</a>
<div class="blogcategory__label"><?= $isTag ? 'Тег' : 'Категория'; ?></div>
<h1 class="blogcategory__title"><?= $isTag ? '#' : ''; ?><?= get_the_archive_title(); ?></h1>
<div class="js-catalog" data-actionname="catalog">
<?php get_template_part('inc/ajax-blog-posts', null, $axParam); ?>
</div>
<nav class="navigation pagination" aria-label="Записи">
<div class="js-pagination-wrap catalog-pagination">
</div>
</nav>
</div>
</main>
<?php
get_footer();