-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpage-contact.php
50 lines (32 loc) · 905 Bytes
/
page-contact.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
<?php
/*template name: Contact*/
get_header(); ?>
<?php nectar_page_header($post->ID); ?>
<?php
$options = get_option('salient');
$map_data = null;
$count = 0;
for($i = 1; $i <= 10; $i++){
if(!empty($options['map-point-'.$i]) && $options['map-point-'.$i] != 0 ) {
$count++;
$map_data[$count]['lat'] = $options['latitude'.$i];
$map_data[$count]['lng'] = $options['longitude'.$i];
$map_data[$count]['mapinfo'] = $options['map-info'.$i];
}
}
function json_map_data() {
global $map_data;
return $map_data;
}
wp_localize_script( 'nectarMap', 'map_data', json_map_data() );
?>
<div class="container-wrap">
<div class="container main-content">
<div class="row">
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
</div><!--/row-->
</div><!--/container-->
</div>
<?php get_footer(); ?>