Wrap elements into div

This commit is contained in:
Markus Ankenbrand 2016-09-08 17:33:09 +02:00
parent fa79a446c8
commit ccf68425ba

View file

@ -49,44 +49,45 @@
<div class="clear"></div>
<?php if ( get_the_category()[0]->name == 'Urlaub' ) : ?>
<table>
<tr>
<th>Land</th>
<td><?php the_field( 'land' ) ?></td>
</tr>
<tr>
<th>Mitreisende</th>
<td><?php the_field( 'mitreisende' ) ?></td>
</tr>
<tr>
<th>Anreise</th>
<td><?php $an = get_field( 'anreise' ); echo(substr($an,6,2).'.'.substr($an,4,2).'.'.substr($an,0,4)) ?></td>
</tr>
<tr>
<th>Abreise</th>
<td><?php $ab = get_field( 'abreise' ); echo(substr($ab,6,2).'.'.substr($ab,4,2).'.'.substr($ab,0,4)) ?></td>
</tr>
</table>
<?php $location = get_field( 'ort' ); ?>
<div>
<table>
<tr>
<th>Land</th>
<td><?php the_field( 'land' ) ?></td>
</tr>
<tr>
<th>Mitreisende</th>
<td><?php the_field( 'mitreisende' ) ?></td>
</tr>
<tr>
<th>Anreise</th>
<td><?php $an = get_field( 'anreise' ); echo(substr($an,6,2).'.'.substr($an,4,2).'.'.substr($an,0,4)) ?></td>
</tr>
<tr>
<th>Abreise</th>
<td><?php $ab = get_field( 'abreise' ); echo(substr($ab,6,2).'.'.substr($ab,4,2).'.'.substr($ab,0,4)) ?></td>
</tr>
</table>
</div>
<h6>Location: <small><?php echo round( $location['lat'], 4 ) ?>, <?php echo round( $location['lng'], 4 ) ?></small></h6>
<div class='map' style='height:300px; margin-bottom: 1.6842em' id='map-<?php echo $id ?>'></div>
<script type='text/javascript'>
var map;
var map_center = {lat: <?php echo $location['lat'] ?>, lng: <?php echo $location['lng'] ?> };
function initMap() {
map = new google.maps.Map(document.getElementById('map-<?php echo $id ?>'), {
center: map_center,
zoom: 15
});
var marker = new google.maps.Marker({
position: map_center,
map: map
});
}
</script>
<div>
<?php $location = get_field( 'ort' ); ?>
<div class='map' style='height:300px; margin-bottom: 1.6842em' id='map-<?php echo $id ?>'></div>
<script type='text/javascript'>
var map;
var map_center = {lat: <?php echo $location['lat'] ?>, lng: <?php echo $location['lng'] ?> };
function initMap() {
map = new google.maps.Map(document.getElementById('map-<?php echo $id ?>'), {
center: map_center,
zoom: 15
});
var marker = new google.maps.Marker({
position: map_center,
map: map
});
}
</script>
</div>
<?php endif; ?>
<?php