forked from Tetrakern/fictioneer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tag.php
95 lines (86 loc) · 2.69 KB
/
tag.php
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
/**
* Tag archives
*
* @package WordPress
* @subpackage Fictioneer
* @since 3.0
* @see wp_tag_cloud()
* @see partials/_archive-loop.php
*/
?>
<?php get_header(); ?>
<main id="main" class="main archive tag-archive">
<div class="observer main-observer"></div>
<?php do_action( 'fictioneer_main' ); ?>
<div class="main__background polygon polygon--main background-texture"></div>
<div class="main__wrapper">
<?php do_action( 'fictioneer_main_wrapper' ); ?>
<article class="archive__article padding-left padding-right padding-top padding-bottom">
<header class="archive__header">
<div class="tax-cloud">
<?php
$current_id = get_queried_object()->term_id;
$current_count = get_queried_object()->count;
$current_description = get_queried_object()->description;
?>
<div class="tax-cloud__header">
<h1 class="tax-cloud__current">
<?php
printf(
_n(
'<span class="tax-cloud__number">%1$s</span> Result with the <em>"%2$s"</em> tag',
'<span class="tax-cloud__number">%1$s</span> Results with the <em>"%2$s"</em> tag',
$current_count,
'fictioneer'
),
$current_count,
single_tag_title( '', false )
)
?>
</h1>
<?php if ( ! empty( $current_description ) ) : ?>
<p class="tax-cloud__tax-description">
<?php echo
sprintf(
__( '<strong>Definition:</strong> %s', 'fictioneer' ),
$current_description
)
?>
</p>
<?php endif; ?>
</div>
<?php
wp_tag_cloud(
array(
'smallest' => .625,
'largest' => 1.25,
'unit' => 'rem',
'number' => 0,
'taxonomy' => ['post_tag'],
'exclude' => $current_id,
'show_count' => true,
'pad_counts' => true
)
);
?>
</div>
</header>
<?php get_template_part( 'partials/_archive-loop' ); ?>
</article>
</div>
</main>
<?php
// Footer arguments
$footer_args = array(
'post_type' => null,
'post_id' => null,
'template' => 'tag.php',
'breadcrumbs' => array(
[fcntr( 'frontpage' ), get_home_url()],
[sprintf( __( 'Results for Tag "%s"', 'fictioneer' ), single_tag_title( '', false ) ), null]
)
);
// Get footer with breadcrumbs
get_footer( null, $footer_args );
?>