<?php $args = array( 'post_type' => 'blog', 'posts_per_page' => 1 ); $loop = new WP_Query( $args ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<div class="col-md-4">
<div class="blog-item_box">
<div class="blog-item_img-box"><img src="<?php the_field('img_blog-item') ?>" alt=""></div>
<div class="blog-item_title"><?php the_title(); ?></div>
<div class="blog-item_info"><?php the_excerpt(); ?></div><a class="blog-item_details-info" href="<?php the_permalink(); ?>">Узнать подробнее</a>
</div>
</div>
<?php endwhile;?>
<script type="text/javascript">
// mapsbox
function initMap() {
var map_one_coordinate = {lat: 50.486251, lng: 30.505882};
map_one_build = new google.maps.Map(document.getElementById('map-one_build'), {
center: map_one_coordinate,
zoom: 18,
});
var image = '<?php echo bloginfo('template_url') ?>/img/maps-and-flags.svg';
var contentString = '<b>Проспект Степана Бандеры 20А</b>';
var infowindow = new google.maps.InfoWindow({
content: contentString
})
marker_one = new google.maps.Marker({
position: map_one_coordinate,
map: map_one_build,
icon: image,
});
infowindow.open(map_one_coordinate,marker_one);
//
map_two_coordinate = {lat: 50.486251, lng: 30.505882};
map_two_build = new google.maps.Map(document.getElementById('map-two_build'), {
center: map_two_coordinate,
zoom: 18,
});
var contentString_two = '<b>Проспект Степана Бандеры 20А</b>';
var infowindow_two = new google.maps.InfoWindow({
content: contentString_two,
})
marker_two = new google.maps.Marker({
position: map_two_coordinate,
map: map_two_build,
icon: image,
});
infowindow_two.open(map_two_coordinate,marker_two);
//
map_3_coordinate = {lat: 50.486251, lng: 30.505882};
map_3_build = new google.maps.Map(document.getElementById('map-3_build'), {
center: map_3_coordinate,
zoom: 18,
});
var contentString_3 = '<b>Проспект Степана Бандеры 20А</b>';
var infowindow_3 = new google.maps.InfoWindow({
content: contentString_3,
})
marker_3 = new google.maps.Marker({
position: map_3_coordinate,
map: map_3_build,
icon: image,
});
infowindow_3.open(map_3_coordinate,marker_3);
//
map_4_coordinate = {lat: 50.486251, lng: 30.505882};
map_4_build = new google.maps.Map(document.getElementById('map-4_build'), {
center: map_4_coordinate,
zoom: 18,
});
var contentString_4 = '<b>Проспект Степана Бандеры 20А</b>';
var infowindow_4 = new google.maps.InfoWindow({
content: contentString_4,
});
marker_4 = new google.maps.Marker({
position: map_4_coordinate,
map: map_4_build,
icon: image,
});
infowindow_4.open(map_4_coordinate,marker_4);
}
initMap();
</script>