-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
60 lines (54 loc) · 1.61 KB
/
index.php
File metadata and controls
60 lines (54 loc) · 1.61 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php get_header(); ?>
<main role="main">
<?php
$section = get_query_var('section');
$firstvar = get_query_var('nc1');
$secondvar = get_query_var('nc2');
$line_end = '';
if ($section === 'list' && !empty($firstvar) && empty($secondvar) && $firstvar !== 'specials') {
$item1 = get_terms(array('topic', 'location'), array('slug' => $firstvar));
$title = $item1[0]->name;
$description = $item1[0]->description;
$line_end = ' News';
}
if ($section === 'list' && !empty($firstvar) && !empty($secondvar) && $firstvar !== 'specials') {
$item1 = get_terms(array('topic', 'location'), array('slug' => $firstvar));
$item2 = get_terms(array('topic', 'location'), array('slug' => $secondvar));
$title1 = $item1[0]->name;
$title2 = $item2[0]->name;
$title = $title1 . ' and ' . $title2;
$line_end = ' News';
}
?>
<?php
if (is_tax('serial')) {
get_template_part('templates/taxonomy', 'specials');
exit;
} else if (is_tax('byline')) {
get_template_part('templates/taxonomy', 'byline');
exit;
} else {
get_template_part('templates/taxonomy', 'custom');
exit;
}
?>
<div class="row">
<div id="main" class="col-lg-8">
<div class="tag-line">
<h1><?php echo urldecode($title); ?><?php _e($line_end, 'mongabay'); ?></h1>
<p><?php echo $description; ?></p>
</div>
<!-- section -->
<section>
<div class="post-wrapper-news">
</div>
<div class="pagination container pv--40 centered gap--20">
<?php mongabay_pagination(); ?>
</div>
</section>
</div>
</div>
</main>
</div>
<!-- /container -->
<?php get_footer(); ?>