Support

Account

Home Forums General Issues Google Map – Multiple Listings

Solved

Google Map – Multiple Listings

  • I’m looking to take the code from the Google Map page (http://www.advancedcustomfields.com/resources/google-map/) and show multiple listings, not just the repeater fields. I have an archive page that shows all of my clients and I’d like to show those clients on the map as well. Right now it will just show the most recent client addition on the map, not all of the clients.

    Here’s my code and URL: http://producepro.wpengine.com/clients/

    <?php if( have_rows(‘map_location’) ): ?>
    <div class=”acf-map”>
    <?php while ( have_rows(‘map_location’) ) : the_row();

    $location = get_sub_field(‘client-location-map’);

    ?>
    <div class=”marker” data-lat=”<?php echo $location[‘lat’]; ?>” data-lng=”<?php echo $location[‘lng’]; ?>”>
    ” class=”img-responsive” />
    <h4><?php the_title(); ?></h4>
    <p><?php echo $location[‘address’]; ?><br>
    Member Since:<?php the_field (‘year_of_implementation’); ?></p>
    </div>
    <?php endwhile; ?>
    </div>
    <?php endif; ?>

  • I see the map full of markers. And the code looks fine too. Is this solved?

  • Yep, I figured it out before anyone replied with help.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.