-
Notifications
You must be signed in to change notification settings - Fork 0
/
tag.php
97 lines (78 loc) · 2.66 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
96
97
<?php
/*
Template Name: Tag page
*/
?>
<?php function get_trim_text ($string) {
$maxlen = 180;
$excerpt = $string;
$excerptlen = strlen($excerpt);
if ($excerptlen > $maxlen) {
$excerpt = substr($excerpt, 0, $maxlen).'...';
$excerptlen = $maxlen + 3;
}
if ($excerpt[0] == '"')
$excerpt = substr($excerpt, 0, $excerptlen-1);
return $excerpt;
}?>
<div id="container">
<div id="content" role="main">
<?php
$taxonomy = get_queried_object();
?>
<div class="page-header myfull">
<h2 style="color:#000"> . </h2>
</div>
<h2>Articles tagged with: <?php single_tag_title(); ?></h2>
<!-- ARTICLE REVIEWS Listing -->
<?php
$args = array( 'post_type' => 'evaluation' , 'tag' => $taxonomy->slug ) ;
$loop = new WP_Query( $args );
?>
<?php if ($loop->have_posts()) :?>
<?php
echo '<p class="spaceup"></p><div class="row"><section class="separator"><h3 class="inseparator"> ARTICLE REVIEWS </h3> </section></div>';
while ($loop->have_posts() ) : $loop->the_post();
get_template_part('templates/loop-feedbacks-noex', get_post_type());
endwhile;
?>
<?php endif; ?>
<?php wp_reset_query(); ?>
<!-- CLAIM REVIEWS Listing -->
<?php
$args = array( 'post_type' => 'claimreview' , 'tag' => $taxonomy->slug ) ;
$loop = new WP_Query( $args );
?>
<?php if ($loop->have_posts()) :?>
<?php
echo '<p class="spaceup"></p><div class="row"><section class="separator"><h3 class="inseparator"> CLAIM REVIEWS </h3> </section></div>';
while ($loop->have_posts() ) : $loop->the_post();
get_template_part('templates/loop-claimreviews');
endwhile;
?>
<?php endif; ?>
<?php wp_reset_query(); ?>
<!-- INSIGHTS Listing -->
<?php
$theCatId = get_term_by( 'slug', 'insight', 'category' );
$theCatId = $theCatId->term_id;
$args = array(
'post_type' => array('post'),
'cat' => $theCatId,
'tag' => $taxonomy->slug,
'posts_per_page' => 10
);
$loop = new WP_Query( $args );
?>
<?php if ($loop->have_posts()) :?>
<?php
echo '<p class="spaceup"></p><div class="row"><section class="separator"><h3 class="inseparator"> INSIGHTS </h3> </section></div>';
while ($loop->have_posts() ) : $loop->the_post();
get_template_part('templates/loop-insights');
endwhile;
?>
<?php endif; ?>
<?php the_posts_navigation(); ?>
<?php the_posts_navigation(); ?>
</div><!-- #content -->
</div><!-- #container -->