ACF does not display Google Maps
-
Hello everyone
I purchased ACF Pro and tried displaying Google Maps on each single post page after taking steps described at https://www.advancedcustomfields.com/resources/google-map/.
I made sure no error was returned on the Console Tab of Chrome and entered the correct field name into the code below also. However, no part of the HTML in the code below would show up in the source, hence no display of Google Maps:
<?php
$location = get_field(‘google-maps’);
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; ?>Could someone please tell me if you successfully showed the maps following the same steps and if you had to modify any part of the steps?
Thank you in advance,
Ead
- The topic ‘ACF does not display Google Maps’ is closed to new replies.