The code in this tutorial makes it super easy to add a Google map in any Genesis child theme. All you need to do is create your own Google API key and swap it out on line 16 of the map.php file.
You can use the code in your child themes functions file or directly in any type of single or archive template with any Genesis hook.
There’s 2 steps to create the map :
1 : Create a ACF field named google_maps using ACF Pro.
2 : Install the code available below for registered users.
1. Create ACF Map
Create a new field group named Google Maps using the following settings as a guide :
Add the address for your map using the Google Maps box on your edit screen :
2. Code Installation
There’s 2 simple steps once you have access to the download folder for logged in members :
Step 1 : From the download folder, copy & paste the PHP code from the functions file to your child themes functions file or template file.
Step 2 : From the download folder, upload the file named map.php to your child themes root directory and swap out the Google API key with your own on line 16 in the file.
Register or login to access the download folder for members :
Was This Tutorial Helpful?