Support

Account

Home Forums Front-end Issues Google Maps shows only string Reply To: Google Maps shows only string

  • i brought the

    <?php

    $location = get_field(‘location’);

    if( !empty($location) ):
    ?>
    <div class=”acf-map”>
    <div class=”marker” data-lat=”<?php echo $location[‘lat’]; ?>” data-lng=”<?php echo $location[‘lng’]; ?>”></div>
    </div>
    <?php endif; ?>

    outside the loop.

    Now it shows an empty field width the height of the acf css