Forum Replies Created

  • Hello James

    Thanks for the suggestion. I’ve been looking for some code I could use to filter fields by field type across ACF Documentation with no luck. Does ACF natively support such functionality?

  • Hello

    I’m experiencing a very similar issue to Malv – searching for any address in the Map field suddenly stopped and disabling all the plugins does not solve it.

    The loading icon just keeps turning…

  • I worked out the code to get the Google Maps to show up on a single custom template page using ACF shown as follows:

    <style type=”text/css”>
    #map * {
    height: 100%;
    #map .gmnoprint .gm-style-mtc{
    height: auto;
    <div id=”map”></div>
    $location = get_field(‘map’);
    if( !empty($location) ):
    var map;
    function initMap() {
    map = new google.maps.Map(document.getElementById(‘map’), {
    center: {lat: <?php echo $location[‘lat’]; ?>, lng: <?php echo $location[‘lng’]; ?>},
    zoom: 18
    <?php endif; ?>

    If you want to display the map on a post listing page outside its loops, you may have to call the following upon defining $location:

    global $post;
    $location = get_field(‘map’, $post->ID);

    For some reason, the trying the solution given at only showed a gray box, which might be because of incompatibility with updated Google Maps API.

  • Hello loorlab

    Thanks for the response.
    I inserted all the code recommended above into my php files and verified that the API key entered was correct, but then again the map is a gray box.

    ACF Customer Support recommened inserting the code as shown below,
    but this did not resolve the problem:

    global $post;
    $location = get_field(‘map’, $post->ID);

    One thing I noticed is that executing the code as shown below only returns ‘Array’…
    Does this indicate anything?:

    echo get_field(‘map’, $post->ID);

  • Hello

    I got Google Maps showing gray ( after copying all the required code given at
    into an single post template, entering an address in the map field and replacing every $location value to the one set in the ACF edit screen.

    The Console tab of Chrome/Firefox returns no error. Would someone please shed some light on this? I spent two days and am not getting anywhere….

    Thank you,


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