Multiple Google Maps
-
I’m currently using a WP_Query to pull some events onto a page and everything works great except for the Google Maps. It seems that only one will show, the other two are just blank.
Is it possible to show multiple maps on the same page? Here’s a sample of my query of how I’m calling all the data.
$query = new WP_Query(array( 'post_type' => array(TribeEvents::POSTTYPE), 'posts_per_page' => 3, 'order' => 'ASC', 'order_by' => '_EventStartDate', 'eventDisplay' => 'custom', 'meta_key' => '_EventStartDate', 'eventDisplay'=>'custom' ));
<?php while ($query->have_posts()) : $query->the_post(); ?> <div class="upcoming-event"> <div class="l-col"> <?php echo tribe_get_embedded_map(); ?> </div> <div class="r-col"> <h4 class="upcoming-event__title"><span class="upcoming-event__date"><?php echo tribe_get_start_date(); ?></span> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4> <h5 class="upcoming-event__venue"><?php echo tribe_get_venue(); ?></h5> <p class="upcoming-event__address"><?php echo tribe_get_address(); ?><br /> <?php echo tribe_get_city(); ?>, <?php echo tribe_get_region(); ?> <?php echo tribe_get_zip(); ?></p> <a class="upcoming-event__directions" href="<?php echo tribe_get_map_link(); ?>">Driving Directions</a> </div> </div> <?php endwhile; ?> <?php wp_reset_postdata(); ?> <a class="btn btn--blue" href="<?php echo get_permalink(119); ?>">View All</a>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Multiple Google Maps’ is closed to new replies.