Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1073479
    zendog22
    Participant

    Hi 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!

    #1073538
    Darshana
    Moderator

    Hi 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.

    #1073572
    zendog22
    Participant

    Hi 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?

    #1073650
    zendog22
    Participant

    Hi, 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 you

    #1073661
    Friech
    Moderator

    Hi 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.

  • <script> jQuery(function($){ $("#no-reply-1073479 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>