forked from oeco/ekuatorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
113 lines (97 loc) · 3.01 KB
/
index.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php get_header(); ?>
<section id="stage">
<div class="container">
<div class="twelve columns">
<?php get_template_part('section', 'subheader'); ?>
</div>
</div>
<?php if(!get_query_var('ekuatorial_advanced_nav')) : ?>
<div id="main-map" class="stage-map">
<?php jeo_featured(); ?>
</div>
<?php endif; ?>
</section>
<section id="content">
<?php
/*
* Side content (get data, share map, contribute)
*/
if(is_front_page() && !is_paged())
get_template_part('section', 'actions');
?>
<?php get_template_part('section', 'publisher-description'); ?>
<?php if(have_posts()) : ?>
<section id="last-stories" class="loop-section">
<div class="section-title">
<div class="container">
<div class="twelve columns">
<h3><?php if(is_front_page()) : ?>
<?php _e('Latest stories', 'ekuatorial'); ?>
<?php elseif(is_tax('publisher')) : ?>
<?php _e('Stories by ', 'ekuatorial'); ?> “<?php single_term_title(); ?>”
<?php elseif(is_tag()) : ?>
<?php _e('Stories on ', 'ekuatorial'); ?> “<?php single_tag_title(); ?>”
<?php else : ?>
<?php _e('Stories', 'ekuatorial'); ?>
<?php endif; ?>
<?php if(is_paged()) : ?>
- <?php printf(__('Page %d', 'ekuatorial'), get_query_var('paged')); ?>
<?php endif; ?>
</h3>
<div class="query-actions">
<?php
global $wp_query;
$args = $wp_query->query;
$args = array_merge($args, $_GET);
$geojson = jeo_get_api_url($args);
$download = jeo_get_api_download_url($args);
$rss = add_query_arg(array('feed' => 'rss'));
?>
<a class="rss" href="<?php echo $rss; ?>"><?php _e('RSS Feed', 'ekuatorial'); ?></a>
<a class="geojson" href="<?php echo $geojson; ?>"><?php _e('Get GeoJSON', 'ekuatorial'); ?></a>
<a class="download" href="<?php echo $download; ?>"><?php _e('Download', 'ekuatorial'); ?></a>
</div>
</div>
</div>
</div>
<div class="container">
<?php
if(get_query_var('ekuatorial_advanced_nav'))
get_template_part('loop', 'explore');
else
get_template_part('loop');
?>
</div>
</section>
<?php else : ?>
<?php query_posts(); if(have_posts()) : ?>
<section id="last-stories" class="loop-section">
<div class="section-title">
<div class="container">
<div class="twelve columns">
<h3><?php _e('Nothing found. Viewing all posts', 'ekuatorial'); ?></h3>
</div>
</div>
</div>
<div class="container">
<?php
if(get_query_var('ekuatorial_advanced_nav'))
get_template_part('loop',' explore');
else
get_template_part('loop');
?>
</div>
</section>
<?php endif; wp_reset_query(); ?>
<?php endif; ?>
<?php // get_template_part('section', 'submit-call'); ?>
<?php
/*
* Side content (get data, share map, contribute)
*/
if(is_front_page() && is_paged())
get_template_part('section', 'actions');
?>
</section>
<?php get_template_part('section', 'main-widget'); ?>
<?php get_footer(); ?>