Google Map

Display the Google Map field without additional JavaScript code.
To make use of the Google Map field you’ll need to define the Google Map API key in your theme.
Copy the code snippet below into your theme’s functions.php file, replacing the ‘YOUR_KEY_HERE’ with your API key. Get Google Maps API key here.
// Google Map API key
add_filter('acf/fields/google_map/api', function ($apiSettings) {
return array_merge($apiSettings, [
'key' => 'YOUR_KEY_HERE',
Tip: Change the height of the Google Map, visit the field group in ACF and define the ‘Height’ in px. Alternatively, define the height using CSS by copying the snippet below into your View CSS Code field in the “Advanced” tab.
/* Define the height of the Google Map */
#views__map {
Last modified 1mo ago