Home Forums Front-end Issues Google Map – How to display? Reply To: Google Map – How to display?

  • I think you can add this code in your function.

    $location = get_field('location');
    if( !empty($location) ){
    echo '<div class="acf-map">
    	<div class="marker" data-lat="'.$location['lat'].'" data-lng="'.$location['lng'].'"></div>

    Then with regards to your script and styles you can add it using wp_enqueue_script() a wordpress core function on adding css and js.

    Source for ACF Google Map:

    Source for WP Enqueue Script:

    Thats it definitely you can display the map on the frontend.