Support

Account

Home Forums ACF PRO Hide marker on Google map Reply To: Hide marker on Google map

  • Amazing!

    So do you mean instead of having;

    <?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; ?>

    I can just do this;

    <?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; ?>