Google map embed works only in Header
-
The Google map embed only works when it’s in the header of my website. When i add it anywhere else it doesn’t show up :( can you please help. I’m so stuck otherwise as the map currently shows up on every page as it’s in the header!!
The blog I need help with is: (visible only to logged in users)
-
Hi @totscityguide,
Thanks for reaching out.
On the WordPress.com, certain restrictions apply when embedding custom code like Google Maps — especially in Pages or Posts using the block editor. A way to fix this is to use the “Custom HTML” Block instead.
- Go to the page or post where you’d like to embed the map.
- Add a Custom HTML block.
- Paste your Google Maps embed code (starting with
<iframe ...>). - Click Preview to make sure it displays correctly.
Some useful Help Docs:
– Embed a Google Map
– Using the Custom HTML blockI hope that works :)
let us know otherwise. -
Hello! Thank you so much for your quick reply. I tried this, the map worked when I clicked the preview button on the text block (on the ‘editing’ page). But when I click the save button on the top right of the page and then the ‘view site’ button, suddenly the map doesn’t preview anymore (but the map that’s in the header still works fine) Any ideas?
Thank you!!
-
Hello, @totscityguide!
I just checked your site and noticed that the map has been embedded twice. The first one appears correctly just below the header, but I saw that the second embed further down the page isn’t displaying properly.
If you’re having trouble with that second embed, I recommend removing it and then re-adding the map using the steps in this guide:
https://wordpress.com/support/google-maps/
Please feel free to follow these steps, and let me know how it goes!
If you need further assistance, don’t hesitate to email us at help@wordpress.com. This allows us to support you more directly while keeping your privacy protected.
Looking forward to hearing from you!
-
Thank you, i just sent an email about the issue. It makes no sense as I am following all the steps in the link you sent me, no luck! There is some reason why the map loads well in the header and not the body copy but have no idea why!
- The topic ‘Google map embed works only in Header’ is closed to new replies.