forked from vanbexlabs/hackathon-wordpress-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
part-search-events.php
30 lines (30 loc) · 1.07 KB
/
part-search-events.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
<section class="home-search-events">
<?php
$map_id = get_field('map');
$hero_buttons = get_field('hero_buttons');
?>
<?php
if (!empty($map_id)): ?>
<div id="map"></div>
<script type="text/javascript">
var map = L.mapbox.map('map', '<?php echo $map_id; ?>')
map.touchZoom.disable();
map.doubleClickZoom.disable();
map.scrollWheelZoom.disable();
// disable tap handler, if present.
if (map.tap) map.tap.disable();
</script>
<?php endif; ?>
<div class="search-box">
<form class="container" role="search" action="<?php bloginfo('url'); ?>/events" method="get">
<input type="search" id="s" placeholder="Search for an event..." name="s" autocomplete="off">
<input type="hidden" name="event-type" value="0">
<input type="submit" value="Search">
</form>
</div><!-- /search-box -->
<?php
if (!empty($map_id)): ?>
<div class="map-overlay"></div>
<a href="#" class="trigger-map small">View Map</a>
<?php endif; ?>
</section>