[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’)

15 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…

Leave a Reply