Google Maps embed shows HTML shortcode instead of map
-
Hello! I am trying to embed a map from Google maps on my website but instead of displaying the map, it only shows the html. The strange thing is that I have it displayed on two pages: my homepage and the page “contacto” and it seems to be working fine on the latter, but no matter what I do, it doesn’t display properly on the homepage.
Thank you in advance.
The blog I need help with is: (visible only to logged in users)
-
Did you put that code in a Custom Html Block -https://wordpress.com/support/google-maps/
-
-
I guess there is something wrong with the code. This is the code I get
[googlemaps https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3966.824762731675!2d-75.43803392428792!3d6.154219027343002!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x8e469deb10c01cc1%3A0x55a99dfeb9f3a409!2sPortanova%20Center!5e0!3m2!1snl!2sbe!4v1718641346720!5m2!1snl!2sbe&w=600&h=450] -
It’s expected that your iframe code for your map gets converted to the one like above.
Could you share the iframe code you pasted into the Custom HTML Block with us?
-
The code I copy from Google Maps is this:
When I create the custom HTML block and paste it, it looks and works fine in the preview, but once I publish it, the code turns into this:
The really weird thing is that the map seems to work on every single page other than the homepage. I even tried it on another test site and it’s the same: displays properly on every page except the homepage.
Thank you in advance.
-
Sorry, for some reason the first code didn’t copy properly. This is what I copy from Google Maps:
http://a%20href= -
-
Okay, I don’t know what’s going on with the page not letting me upload what I need. I’m trying to re-upload the image from another browser:

In case it doesn’t show up it’s like this without the coding notation (which I think is causing the problems on here):
iframe src= https://www.google.com/maps/embed?pb=!1m10!1m8!1m3!1d15866.007718752055!2d-75.5858882!3d6.1973134!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2sco!4v1718763849836!5m2!1sen!2sco width=”600″ height=”450″ style=”border:0;” allowfullscreen=”” loading=”lazy” referrerpolicy=”no-referrer-when-downgrade” iframe -
Hi there!
I can see that a Google Map is already showing in the Visítanos section on your homepage now. Is there anywhere else you want to have a Google Map shown?
- The topic ‘Google Maps embed shows HTML shortcode instead of map’ is closed to new replies.