-
Notifications
You must be signed in to change notification settings - Fork 1
/
page-map.php
39 lines (30 loc) · 1.22 KB
/
page-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
<?php
/*
Template Name: Map
*/
get_header();
?>
<?php the_showcase(); ?>
<?php if ( ( has_cmb2_value( 'map-button-1-text' ) && has_cmb2_value( 'map-button-1-url' ) ) || ( has_cmb2_value( 'map-button-2-text' ) && has_cmb2_value( 'map-button-2-url' ) ) || ( has_cmb2_value( 'map-button-3-text' ) && has_cmb2_value( 'map-button-3-url' ) ) ) { ?>
<div class="bg-grey-light">
<div class="wrap group two-column map-buttons">
<?php
if ( has_cmb2_value( 'map-button-1-text' ) && has_cmb2_value( 'map-button-1-url' ) ) {
print '<a href="' . get_cmb2_value( 'map-button-1-url' ) . '">' . get_cmb2_value( 'map-button-1-text' ) . '</a>';
}
if ( has_cmb2_value( 'map-button-2-text' ) && has_cmb2_value( 'map-button-2-url' ) ) {
print '<a href="' . get_cmb2_value( 'map-button-2-url' ) . '">' . get_cmb2_value( 'map-button-2-text' ) . '</a>';
}
if ( has_cmb2_value( 'map-button-3-text' ) && has_cmb2_value( 'map-button-3-url' ) ) {
print '<a href="' . get_cmb2_value( 'map-button-3-url' ) . '">' . get_cmb2_value( 'map-button-3-text' ) . '</a>';
}
?>
</div>
</div>
<?php } ?>
<div class="map">
<iframe src="<?php show_cmb2_value( 'map-url' ); ?>" class="map-frame"></iframe>
</div>
<?php
get_footer();
?>