For the Green Mountain Gamers site, I wanted to insert a shortcode for embedding Google Maps, as the visual editor strips out the iframes in which they come. This makes it difficult for anyone not used to toggling between the visual and HTML modes to edit a page without accidentally removing the embedded map.
First off, I tried a number of plugins, but they didn’t display the information quite the way I wanted it — one doesn’t include the ability to get directions to the displayed location! — or seemed excessively resource-intensive.
Then I started looking for a shortcode, something I could paste into functions.php of a theme. I found this post on DigWP.com, but the shortcode didn’t work right at first, due to something changing in Google’s API, I guess.
A little tinkering later and I discovered that if you add an attribute to the end of the eighth line of code, it’ll work again. At first, it looks like this:
Then you add
&output=embed like this:
And the shortcode works again, embedding a map in the page using the format described in the DigWP post. I feel pretty proud for figuring that out on my own.