Sometimes recently we've noticed that the Google Map doesn't display on themes such as Swenson when we clone from webcarepreview to the live domain...
I have worked out a fix for it. You need to create a google map API key in google, once you get the api key for example "AIzaSyCVXZNnju4RebSPN75hjUKTSNQWJN0EI-c" you need to add it to the code below..
http://maps.googleapis.com/maps/api/js?key=INSERT KEY HERE
so..
http://maps.googleapis.com/maps/api/js?key=AIzaSyCVXZNnju4RebSPN75hjUKTSNQWJN0EI-c
You then need to go into FTP for the live domain and go to the themes Functions.php file and find this line...
wp_register_script( 'googlemaps-api', 'https://maps.google.com/maps/api/js?sensor=false', array( 'jquery' ), null , true );
It is approximately on line 387.
Replace the https code with the code above so it is now:
wp_register_script( 'googlemaps-api', 'http://maps.googleapis.com/maps/api/js?key=AIzaSyCVXZNnju4RebSPN75hjUKTSNQWJN0EI-c', array( 'jquery' ), null , true );
Save it and check the map works.
Google Map not loading after site clone Print
Modified on: Mon, 9 Apr, 2018 at 10:55 PM
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.