[wp_geo_map]

In the WP Geo settings you can choose to show the map above the post, below the post or position manually in your post using the [wp_geo_map] shortcode. If you select ‘manually’ but don’t use a shortcode, the map will not display within your post.

Available parameters are:

  • width
  • height
  • align (defaults to ‘none’)
  • lat
  • long
  • type (defaults to ‘G_NORMAL_MAP’)

[wpgeo_longitude] and [wpgeo_latitude]

You can display the longitude and latitude values in your posts using [wpgeo_longitude] and [wpgeo_latitude].

[wpgeo_map_link]

[wpgeo_mashup]

You can add extra parameters to this shortcode. For example:
[wpgeo_mashup height="500px" width="100%"]

Available parameters are:

  • width (defaults to WP Geo setting)
  • height  (defaults to WP Geo setting)
  • type  (defaults to WP Geo setting)
  • polylines (defaults to WP Geo setting)
  • polyline_colour  (defaults to WP Geo setting)
  • align (defaults to ‘none’)
  • numberposts (defaults to  -1)
  • post_type
  • post_status (defaults to ‘publish’)
  • orderby (defaults to ‘post_date’)
  • order (defaults to ‘DESC’)
  • markers (defaults to ‘large’)

42 Responses to “Shortcodes”

  1. Nnyan says:

    Can this tag be used in a page? I don’t want maps on posts but I want people to enter an address in a post and have that location show up on ONE map that will be displayed in a page.

    • RavanH says:

      The shortcode [wpgeo_mashup] will work on any page and is designed to show all Geo locations from all posts on one map… It should be what you are looking for,if I’m not mistaken :)

  2. Cel says:

    RavanH that’s what I needed. Any simple explanation on how to display it??? “show all Geo locations from all posts on one map”

  3. is150 says:

    hi,
    what is [wpgeo_map_link] for? I try to put in my page and nothing happen…

  4. trusktr says:

    Hey, I have an idea to help improve the small but growing WP Geo community!

    How about turning these documentation pages into wiki pages where users can submit edits/revisions for approval by the site admin?

    It’s not hard to do at all:

    * First, create a custom post (page) type called “wiki” (or whatever you like) with custom capabilities (eg edit_wiki, edit_others_wiki, etc).
    * Then migrate all documentation pages from the standard “page” type to the “wiki” post type.
    * Then use the “Members” plugin to add the edit_wiki capability (and other desired capabilities except for publishing capabilities) to the subscriber role.
    * Then add the “Revisionary” plugin that allows users with the edit_wiki capability to submit revisions for approval (or denial) by the admin(s).
    * Add “Peter’s Post Notes” and “Peter’s Collaboration E-mails” so that users can be notified of approvals or denials. Admins can include optional notes explaining the approval or denial.

    And viola, your users can now submit revisions of documentation pages for you to approve (or deny) and thus help you make wpgeo.com a more useful resource for users of your plugin.

    I think that’d be neato!

    I’d especially make use of it as I dive into WP Geo while developing my site.

    Cheers!

  5. Andy says:

    I’ve been trying to add a page with a map containing all posts in one map but i only get the last 5 posts. Does anyone know how to use the wpgeo_mashup shortcode to generate the map with all posts?

    The plug-in is great! thanks a lot!

    • Ben says:

      I think it accepts pretty much the same parameters as get_posts() so specifying “numberposts” to -1 should do it.

    • Andy says:

      I’ve tried some combinations… none of them work, all of them show a default 5 post:

      [wpgeo_mashup {numberposts:-1}]
      [wpgeo_mashup {numberposts:'-1'}]
      [wpgeo_mashup numberposts:-1]
      [wpgeo_mashup {numberposts=-1}]
      [wpgeo_mashup numberposts:-1]
      [wpgeo_mashup numberposts:'-1']

      no one works…

    • Ben says:

      Try [wpgeo_mashup numberposts="-1"]

    • Andy says:

      Great! Thanks a lot! I will donate when i get some money in my bank! you’ve been so fast!! Cool job!

    • Gaijin San says:

      Using [wpgeo_mashup] in a page initially displayed only one item.
      Using [wpgeo_mashup numberposts=-1] displayed all my posts.
      I find those parameters are not well documented right now, or at least not obvious to find…

      I would suggest adding them on this page with example like
      [wpgeo_mashup numberposts=-1]
      [wpgeo_mashup height=500px width=100%] etc…

  6. is it possible to see the markers of panoramia’s photos in wpgeo?

  7. Mauri says:

    Hi,
    great great plugin..
    only a question: how can I show in a single page all the place of category “restaurants” and in another page alls of “hotels”?
    thx in advance.

    mauri

  8. Brandon Shaw says:

    Thanks Ben for the fantastic plugin!

    Is it possible to use a short code to return the geo title? I know you have provided a way to do so with template tags, but how about a short code?

  9. Brandon Shaw says:

    I know you don’t have to be as helpful as you have been, so I owe you a huge thank you!

    You have been incredibly helpful, and incredibly responsive. I am happy to donate for your hard work!

  10. Steve says:

    Hi There,

    I dont know if I am missing something?

    I am try to get a map displaying all my geotagged posts on one map on a page, all of the posts are custom call ‘portfolio1′

    I have been trying the [wpgeo_mashup] shortcode..but nothing?

    I wonder if you could point me in the right direction?

    Many thanks

  11. maria says:

    Hi!

    Is there a way to zoom the map with thia shortcode [wpgeo_mashup]?

    Thanks in advance!

  12. Florian says:

    Hi,

    I have got a problem with the [wpgeo_mashup] tag. It is somehow related to the theme I am using (autofocus).

    I also had to enter

    div.wp_geo_map img {
    max-width:none;
    }

    to the css file in order to display the maps unter the posts.

    In the page I would like to show the mashup map, it shows a normal map (using [wp_geo_map]), but not the mashup one…

    Using another theme, the mashup map is shown…

    Any idea what I could do? Thanks a lot!

  13. Ben says:

    Are you using [wpgeo_mashup] on a page or post?
    You will need to check the “Show Maps On Pages” checkbox for it to work in the settings.
    Is it displaying a blank area where the map should be?

    • Florian says:

      Hi, thanks for your answer. I am using it on a page, and “Show Maps On Pages” is checked. Also, the maps is shown using another theme. With “autofocus” it is displaying a blank area where the map should be.

      (I could send you the link to the page in a private message, if you want to. As it’s a private blog for friends I would prefer to not post it here.)

    • Florian says:

      By the way, I tried now to insert [wpgeo_mashup] in a post, i did not work either.

    • Ben says:

      Does it leave a space where the map should go?
      Can you post a link to the site?

  14. Florian says:

    it does leave a space where the map should go?

    any chance to send you the link via private message/e-mail? (would prefer to not post it here as it is a private blog for friends.)

  15. Aaron says:

    Ben, I love your plugin, but having the same issue as Florian was having – using that shortcode I get a space where the map should go, but no map displayed.

    Was this issue resolved?

    Thanks!

  16. olivia says:

    sometimes the maps won’t load and leave a blank space where they should be. I found that clearing the browser’s cache solves this issue for me. maybe it’ll work for others as well.

  17. RavanH says:

    Hi Ben, I’m trying to use [code]echo do_shortcode('[wpgeo_mashup]');[/code] inside a custom post type custom taxonomy template taxonomy-artistscat.php but on the front end, it shows only a map but no markers. I tried the shortcode before and after the loop… On Settings > WP Geo the option for the custom post type is checked (and on the custom post type single pages, the map shows the marker correctly) and the option All Taxonomies is checked. What else am I missing here?

  18. RavanH says:

    For reference, a custom taxonomy page (for custom post type) on our development site can be seen on http://artistesdardeche.pomclic.fr/categorie/bois/ where there should be two markers.

    Thanks for any thoughts :)

  19. benhuson says:

    Can you post a screengrab of your main WP Geo settings page?
    Maybe add it as an issue and upload the image here:
    https://github.com/benhuson/WP-Geo/issues

Leave a Reply