This plugin will enable a simple short code that you can use for embedding Google Maps in any WordPress post or page. The short code uses the WordPress HTTPS API and the Transients API for delivering cached maps with little to no impact on your site’s performance.
Maps are displayed with the [pw_map]] short code:
[pw_map address="New York City" key="YOUR API KEY"]
Google now requires that new accounts use an API key. You can register a free API key here.
- Activate the plugin.
- Obtain an API key here.
- Added [pw_map address=”your address here” key=”YOUR API KEY”] to any post or page.
- Can I change the width or height of the map?
Yes, simply supply a width and height parameter:
[pw_map address="New York City" width="400px" height="200px" key="YOUR API KEY"]
You can also use percentages for heights:
[pw_map address="New York City" width="50%" height="200px" key="YOUR API KEY"]
- Can I disable the scroll wheel?
Yes, simple add
enablescrollwheel="false" to the short code.
[pw_map address="New York City" enablescrollwheel="false" key="YOUR API KEY"]
- Can I disable the map controls?
Yes, simple add
disablecontrols="true" to the short code.
[pw_map address="New York City" disablecontrols="true" key="YOUR API KEY"]
- How are the maps cached?
Maps are cached using the WordPress Transients API, which allows for very simple database-based caching.
Each time you display a map, the address specified is used to generate a unique md5 hash, which is used for the cache identifier. This means that if you change the address used for your map, the cache will be refreshed.
- How often do caches refresh?
The maps are cached for 3 months. Caches are automatically cleared (for individual maps) when you change the address in the short code.
Very simple, thank !
You can use its shorcode and just works. Lovely simple.
All it needs to be. Clean, simple, works!
Sorry I was going to give this 5 stars BUT I had finger trouble.
But, WordPress.org doesn’t allow me to delete a comment to start again or edit the rating on a comment (well not that I can see in FF). Come on WordPress stop mucking about with stupid new features and give some attention to the core system please…
If anybody knows how to delete a comment or change a rating then please let me know!
Contributors & Developers
“Simple Google Maps Short Code” is open source software. The following people have contributed to this plugin.Contributors
keyparameter to the [pw_map] short code.
- Added missing load_plugin_textdomain()
- Changed textdomain for language packs
- Fixed a bug with the zoom parameter not working
- Fixed a bug with sites on HTTPS
- Added support for disabling map controls via disablecontrols=”true”, thanks to Alex Hochberger
- Added support for disabling the scroll wheel zoom via enablescrollwheel=”false”, thanks to Alex Hochberger
- Fixed a conflict with the Live Composer plugin.
- Updated Google Maps API to fix broken maps after version 2 was deprecated on March 8, 2013
- Improved error responses
- Added CSS to fix a problem with responsive themes
- First release!