A lot of WordPress themes ship with a YouTube tag – or one from a similar service – that just means adding videos is as easy as hitting a button and pasting in the video ID. Thanks to this Digging into WordPress shortcode, we can easily add in a Google-powered map, just by pasting in the URL provided on the map page.
Usage
There’s only three shortcode attributes to use here: width, height and URL. The first two are pretty self-explanatory and, when not used, default back to the width and height values set in the code above (which you can of course modify). The final, required attribute is the URL, available by clicking the “Link” button on the Google Maps website.
[gist id=4081576]
Leave a Reply