forked from InfoAmazonia/infoamazonia-wptheme
-
Notifications
You must be signed in to change notification settings - Fork 1
/
single-map.php
68 lines (61 loc) · 2.64 KB
/
single-map.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
<?php get_header(); ?>
<section id="stage">
<div class="container">
<div class="twelve columns">
<ul class="share">
<li class="facebook">
<div class="fb-like" data-href="<?php the_permalink(); ?>" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false" data-font="verdana" data-action="recommend"></div>
</li>
<li class="twitter">
<a href="https://twitter.com/share" class="twitter-share-button" data-via="infoamazonia" data-lang="<?php if(function_exists('qtranxf_getLanguage')) echo qtranxf_getLanguage(); ?>">Tweet</a>
</li>
<li class="share">
<a class="button share-button" href="<?php echo jeo_get_share_url(array('map_id' => $post->ID)); ?>"><?php _e('Embed this map', 'infoamazonia'); ?></a>
</li>
</ul>
<h1 class="title"><?php the_title(); ?></h1>
<?php get_template_part('stage', 'map'); ?>
</div>
</div>
</section>
<section id="content">
<?php
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$query = array(
'paged' => $paged,
's' => isset($_GET['s']) ? $_GET['s'] : null
);
query_posts($query);
if(have_posts()) : ?>
<section id="last-stories" class="loop-section">
<div class="section-title">
<div class="container">
<div class="twelve columns">
<h3><?php _e('Stories on', 'infoamazonia'); ?> “<?php the_title(); ?>“</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', 'infoamazonia'); ?></a>
<a class="geojson" href="<?php echo $geojson; ?>"><?php _e('Get GeoJSON', 'infoamazonia'); ?></a>
<a class="download" href="<?php echo $download; ?>"><?php _e('Download', 'infoamazonia'); ?></a>
</div>
</div>
</div>
</div>
<div class="container">
<?php get_template_part('loop'); ?>
</div>
</section>
<?php
endif;
wp_reset_query(); ?>
<?php get_template_part('section', 'submit-call'); ?>
</section>
<?php get_template_part('section', 'main-widget'); ?>
<?php get_footer(); ?>