The Gravstrap Google map shortcode handles a Google map component. Here is a live example:

The Google map shortcode, shown above, is defined by the following definition:

[g-map id=map center="41.90278,12.49637" zoom=12]
    [g-map-marker location="41.90278, 12.49637" title="Gravstrap theme"]
    **Meet Us**
    We are there!

Shortcode parameters

The [g-map] shortcode has some optional parameters:

  • id - defines the same name HTML attribute and it is mandatory.
  • api-key - optional parameter to define the Google api key
  • center - defines the center of the map
  • zoom - defines the zoom detail

You can display an arbitrary number of markers on the map, using the [g-map-marker] shortcode, It has the following parameters:

  • location - defines the marker location
  • title - defines a title

It accepts a markdown content which is rendered as a pop-up, when the marker is clicked.


This shortcode has been introduced with Gravstrap 1.0.3 and replaces the map rendered by the Googlemaps plugin, which was used since this release.

To upgrade your pages, you just need to replace the [GOOGLEMAPS:map] definition with the new shortcode.

Next Post Previous Post