This repository has been archived by the owner on Jul 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
taxonomy-hrs_unit.php
94 lines (78 loc) · 1.89 KB
/
taxonomy-hrs_unit.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
<?php
/**
* HRS Unit Taxonomy Archive Template
*
* The template for displaying lists of posts in the custom HRS Unit taxonomy.
*
* @package HrswpTheme
* @since 0.14.0
*/
use HrswpTheme\components\navigation;
global $is_feature;
get_header();
?>
<main id="wsuwp-main" class="spine-hrs_unit-index">
<header class="page-header">
<?php /* translators: the HRS news archive title: 1: the taxonomy name */ ?>
<h1><?php printf( esc_html__( 'HRS News from %s', 'hrswp-theme' ), single_term_title( '', false ) ); ?></h1>
</header>
<?php
if ( have_posts() ) {
$result_count = 0;
while ( have_posts() ) :
the_post();
if ( ! is_paged() ) {
if ( 0 === $result_count ) {
$is_feature = true;
?>
<section class="row single gutter pad-ends features">
<div class="column one">
<div class="articles-list">
<?php
}
if ( 1 === $result_count ) {
$is_feature = false;
?>
</div>
</div>
</section><!-- .features -->
<section class="row single gutter pad-ends latest">
<div class="column one">
<div class="cards">
<?php
}
if ( 4 === $result_count ) {
?>
</div>
</div>
</section><!-- .latest -->
<section class="row single gutter pad-ends article-archive">
<div class="column one">
<header>
<h2>More from <?php single_term_title(); ?></h2>
</header>
<div class="articles-list">
<?php
}
} elseif ( 0 === $result_count ) {
?>
<section class="row single gutter pad-ends article-archive">
<div class="column one">
<div class="articles-list">
<?php
}
get_template_part( 'build/templates/archive' );
++$result_count;
endwhile;
?>
</div>
</div><!--/column-->
</section>
<?php
}
navigation\render();
get_template_part( 'build/templates/footer' );
?>
</main><!--/#page-->
<?php
get_footer();