Site logo

Archived topic

Key Google Maps

7 replies · Started by noe_sp on August 17, 2020

Viewing posts 1–8 of 8

Hello,

I've created an api key for a restrict domain.

In the website, I've created a new hook and put this code:

<script async defer src="https://maps.googleapis.com/maps/api/js?key=MY API KEY&callback=initMap"
type="text/javascript"></script>

wp_head, entire site and for all users, but I the map not works..

Thank you

Regards

Hi there,

Is that supposed to be in wp_head hook?

Can you link me to the instruction?

Hi there,

The other info that David provided should help. The script should be added to wp_footer, and then you need to add the map HTML to the page.

You should just need to follow their instructions step by step to get it to work.

Hello,

I have done the indications and I continue with the same problem,

Thank you,

Regards

There is more to it then just adding the script.
In this link you will see there is a HTML element and an Init function that has to exist in the pages content.

Maybe use a Plugin to handle this

This archived topic is closed to new replies.