Tagged: x
-
AuthorPosts
-
July 5, 2016 at 2:14 pm #1073479
zendog22ParticipantHi guys, Google maps on my contact page doesn’t show. My host WP Engine thinks it’s a cache issue and is asking if you could please tell me what cookies would need to be excluded from a cache for it to work. The attached screenshot shows the error.
http://www.kentishandco.com/contact/
I have deleted the map and re-added but it didn’t work.
Many thanks for your help!July 5, 2016 at 2:49 pm #1073538
DarshanaModeratorHi there,
Thanks for writing in! The Google Maps APIs require an API key for new domains as of June 22nd, 2016. See announcement here (http://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-updates-to-google.html)
Please refer to the following instructions (https://community.theme.co/forums/topic/map-error/#post-1059000).
Thanks for understanding.
July 5, 2016 at 3:15 pm #1073572
zendog22ParticipantHi Darshana, I’m sorry, I don’t understand the thread. I have created an API in Google. Please can I PM that to you along with my log in details for you to take a look?
July 5, 2016 at 3:53 pm #1073650
zendog22ParticipantHi, sorry, please ignore me, I got it working. I have generated the API via this link: https://console.developers.google.com/apis/credentials/key?project=global-catcher-136323&type=CLIENT_SIDE
I have then added the code below to my child theme’s PHP file.
function my_add_frontend_scripts() {
wp_register_script( ‘vendor-google-maps’, ‘ADD YOUR API HERE’);
wp_enqueue_script( ‘vendor-google-maps’ );
}
add_action(‘wp_enqueue_scripts’, ‘my_add_frontend_scripts’, 100);It works! And I can see the map!
thank youJuly 5, 2016 at 4:06 pm #1073661
FriechModeratorHi There,
You don’t need to follow the whole thread, you just need that specific post from Rue Nel
https://community.theme.co/forums/topic/map-error/#post-1059000
If you already have your Google Map API key, please add the following code in your child theme’s functions.php file
function my_add_frontend_scripts() { wp_register_script( 'vendor-google-maps', 'https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY'); wp_enqueue_script( 'vendor-google-maps' ); } add_action('wp_enqueue_scripts', 'my_add_frontend_scripts', 100);Replace the string YOUR_API_KEY with your actual API key.
If the issue remain after doing this, please provide us login credentials (FTP & WP-admin) in private reply.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1073479 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
