Map My Posts WordPress Plugin

Display your categories or tags on a Google Map or Geochart visualization. Perfect for travel bloggers!

Download from the WordPress Plugin Directory

The Google Map above was produced using Map My Posts and displays the location of categories from the AroundThisWorld.com travel blog. It was added to this page using the shortcode:

[mmp-map]

Getting Started

  • Install and activate the plugin like you would any other WordPress plugin in the wp-content/plugins directory.
  • Associate your categories or tags with locations from the Admin Posts-Categories or Posts-Tags area.
  • Add one of the widgets or add a shortcode to any page or post to Map My Posts!

API Key

Google recommends using an API console key, even though they still support requests without an API key. There is a “courtesy limit” of 25,000 requests per day to Google Maps and Static Maps APIs (limits and overage fees are detailed on the Google Developers site).

You can request or manage API keys using the Google APIs Console.

In the API Console, make sure you have enabled “Google Maps API v3″ and the “Static Maps API.”

Copy the API Key found in the “API Access” menu into the Map My Posts plugin settings screen.

Geocoding Categories & Tags

You will need to associate categories or tags with locations for them to be displayed by Map My Posts. In the WordPress Admin area, under Posts, select Categories or Tags. You can add new categories or tags with geocoded locations for Map My Posts, or edit your existing items.

Map My Posts will attempt to match your existing categories or tags with a country, based upon the name. You will see a message such as the one displayed below. Note: you still need to click the “Update” button to save the association.

If Map My Posts matches your existing category or tag name with a country, it will automatically select the country. You still need to click the "Update" button.

If Map My Posts matches your existing category or tag name with a country, it will automatically select the country. You still need to click the “Update” button to make the association.

You can search for a location, such as a business name, landmark, or street address using the Location text entry box. If you need a more exact location, drag the marker to any point on the map after you have entered a location search.

Shortcodes & Map Types

There are three different map types available. We’ve already seen the standard Google Map at the top of this page. Once again, it’s called with:

[mmp-map]

You can also display a Google Geochart visualization:

This is shown with the shortcode:

[mmp-geochart mode="region"]

The Geochart has two different display modes. Region (as seen above), will only work with categories or tags that have been associated with a country. If you need to display cities or other non-country level locations, use the marker mode:

This is shown with the shortcode:

[mmp-geochart mode="marker"]

You can control the default mode and colors in the Map My Posts settings page in your WordPress admin area.

Download from the WordPress Plugin Directory

Plugin en el español por Andrew de WebHostingHub

39 thoughts on “Map My Posts WordPress Plugin

  1. Michal

    Hi
    Thank you for an excellent plugin. Works just fine and is relatively easy to implement.
    It works like a dream if you want to have a menu of your posts on one map, where people can view the posts accordingly to a location.
    I was thinking about using it in a bit different way for my travel blog. I was after a widget, that will show a map with the location, where the post was written, another words on every post in the side bar there would be only one marker…

    Is it doable? Maybe all I need is just to change a small peace of the code to make it work the way I envision it?

    thank you for your help

    Reply
  2. Peter Clark

    Great plugin. Many thanks for writing it and publishing it!

    One small request is to add in fields for maxZoom and minZoom when creating the google.maps.Map object. I need minZoom, so I have made a fork of your plugin for the time being but would love to avoid that going forward.

    Reply
  3. Eirik Nereng

    Hello! It does not seem to work now. Using the [mmp-map] shortcode it seems to create a map-sized, blank area. Just look at the top of this article. Any ideas? Love the concept of this plugin! :-)

    Reply
  4. Marek

    In case you get a blank space instead of the map, this can be caused by the Google Javascript (jsapi) not loading. WordPress does NOT do this by default but some other plugins can cause it. One of the most popular plugins that can cause problems is NEXTGEN gallery.

    Reply
  5. vitlastovka

    Hi, if I understand it well this plugin means I can have a google map widget on sidebar (for example) with pins of my travel blog posts and after visitor click on pins, certain post will open (in new or same window), Am I right ?
    Thanks Vit

    Reply
  6. Charles Como

    The plugin no longer works, even on this website above. I’ve isolated the problem to be that plugin is spitting out the URL for Google maps incorrectly, putting
    `&ampheight=` instead of `&height=` It’s in the file inc/MapMyPosts.php at the bottom, but I don’t know how to fix it.. it has something to do with http_build_query but I don’t know how to make it not include the unicode stuff above. Will post a followup when I figure it out, unless someone else figures it out before me.

    Charles

    Reply
  7. Bob Churchill

    Any chance of incorporating a function to automatically create a list of country categories which are pre-selected with the appropriate geo location? I.e. you could click a button that said “Give me the world” to add such categories in?

    Reply
  8. madenza

    Lovely plugin. I wanted to use lat long coordinates which I can geocode as I am adding a post. So every post can be filtered, by taxonomy, tag, category or post type, and make multiple maps across my wp sites. Like a map navigation if you like.

    My process is simple. I add an address to a post as a custom field. Then the post is viewed (even in preview) the geocoding takes place and adds two custom fields, latitude and longitude.

    Thats it then. Use some shortcodes to filter the maps the way you want to display the posts anywhere on my wp install.

    You can test it for yourself, its a free WP add on

    http://www.google-map-it.com/google-map-it-plugin-v2/

    Reply
  9. Jeffrey Griffin

    Hi,

    Thanks for the great plugin! I’m trying to get it up and running now and having a bit of trouble. See the test page here: http://weekendblitz.com/map-test-page/

    I find that the shortcodes: [mmp-geochart mode="marker"] & [mmp-geochart mode="region"] display perfectly fine but when I use the main shortcode, [mmp-map] a blank box is shown on the page. Any ideas what could be causing this?

    Thanks!
    Jeffrey

    Reply
  10. Mandy

    It does nog work completely for me. It shows the map centered in the middle with a blank space up and down, and also my markers are not showing while I did add them in the categories. Someone who wants to help me out?

    Reply
      1. Erik Post author

        Hi Mandy, I cannot load that page – did you associate your tags or categories with locations? Remember to edit these under Posts -> Categories (or Tags)

        Reply
  11. damien

    Hi,

    Excellent plugin and ive been looking for something like this for ages!

    Im trying to achieve the following things, is it possibel?

    • How do I set the background to transparent?
    • Is it possible to have the GEO map more zoomed in and have the ability to scroll around and then click the markers?

    Thnaks in advance for any help you can provide.

    my URL is http://www.tripsixdesign-dev.com and the map is under the “Location” tab

    Cheers
    Damien

    Reply
  12. Dayna

    Hey,

    Great app! Pretty much exactly what I was looking for!

    Any way you could change the mmp-map to have larger container boxes in order to get rid of the scroll bars? I want the ability to zoom which the other 2 set ups don’t have however, I find the scroll bars distracting.

    Otherwise perfect!

    Reply
    1. Erik Post author

      Thanks, Dayna! Are you seeing scrollbars on the mmp-map above? Do you mean you would like to remove the zoom control +/- along the left?

      Reply
      1. Dayna

        Sorry, I should’ve been a bit clearer – my mistake :) I meant when you click on the markers on mmp-map some of the boxes containing the country and number of posts have a scroll bar in them. Clicking on South Korea in the mmp-map above is fine however, when you click on New Zealand and most others, you get a scroll bar.

        Would be great if the markers showed the info in a similar way to the geocharts or maybe it’s easier to make the geocharts zoom in and out? If the geocharts zoomed in/out then I’d be able to use them instead. As it is now, if I can’t zoom, it’s hard to see the smaller countries I’ve posted about.

        Thanks!

        Reply
  13. Crystal

    Hello,

    Very happy to have found this plug-in which is perfect for our non-profit organization.

    Currently am using the geochart and I wondered how I might be able to remove the post number from the hover window, yet keep the country name. I have searched the plug in code with no luck.

    Reply
    1. Erik Post author

      Is this the association it is making automatically? You should be able to change the location by editing the category (go to WordPress admin, Posts, and choose Categories), and using the search box next to the map, or dragging the map pin location to any place in the world.

      Reply
  14. garinetch

    Fantastic plugin, thanks so much.

    One quick question: the map is tiled several times horizontally, meaning there are three Africas, three Australias, etc. I’ve tried changing the height and width to zoom it to the point where I just have one single map of the world, but no matter what combination I try I can’t make it work. Any suggestions?

    Thanks again!

    Reply
  15. Peter

    If I have several posts that are for different zip codes (like in USA) for one country, how can I show them on a map in each of their locations? Can we only organize by country?

    Reply
  16. bogboo

    hi, nice plugin. it’s perfekt for my webside. but i have a question: is it possibel to start de plugin directly with a php-code. my idea is to put the plugin directliy on de “Startblog”. actually i have done this with an other plugin.

    but this plugin is better for my way of Blogging. sometimes i have more countrys in one post. with the actual plugin is it not possibel to Show the text by 2 countrys.

    Reply
    1. bogboo

      i found a solution. but my next Problem is that the links get opend in a new window when i use:
      [mmp-geochart mode="region"]

      How can i fix this, that the links get open in the same window?

      Reply

Leave a Reply