Embedding a Google Map in WordPress? Getting ‘googleapps’ shortcodes? Fix it thus

The instructions WordPress gives for embedding Google Maps are basically right, but I encountered a big problem: instead of the old, functioning ‘googlemaps etc’  shortcodes, the iframe code was converting to something that began ‘googleapps domain=”www” etc’.

While previous embeds in the old format still worked, the new auto-generated shortcodes did bupkis. Zip. They weren’t stripped out of the text editor (HTML or visual – I tried both) but nothing appeared on page, and a quick look at the source indicated the code wasn’t even making it to the browser.

I tried editing in different browsers, and applying older or simpler themes (not that Bueno is wildly complex). No joy.

The solution is buried in this thread from the WP support forums, in a post by WordPress Tips author Panos. Here’s how to apply it to a ‘googleapps’ shortcode:

  1. Change ‘googleapps’ to ‘googlemaps’
  2. Delete all the other crap
  3. Go back to the original iframe code and copy everything in the src element
  4. Paste that in after ‘googlemaps’
  5. The URL string you just pasted in will being ‘http://www.google.com/maps…’ – change ‘www’ to ‘maps’
  6. If necessary, force size by adding these to the end of the URL string:
    • &w=[width in pixels]
    • &h=[height in pixels]
Advertisement

Leave a Comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s