WP Go Maps (v9)
Map Features

Shortcodes

18min
overview this section covers how to display maps on the front end, using shortcodes instead of gutenberg blocks shortcodes can be used to displayed maps as configured in the map editor, or addional parameters can be included to modify certain aspects of how the maps are displayed prerequisites the following plugin/s need to be installed and active wp go maps wp go maps pro add on sections default shortcode https //docs wpgmaps com/zndi shortcodes#jnve7 map mashup https //docs wpgmaps com/zndi shortcodes#mgpif category usage https //docs wpgmaps com/zndi shortcodes#svmat focus on a specific marker (at a specific zoom level) https //docs wpgmaps com/zndi shortcodes#xjamw enable/disable directions https //docs wpgmaps com/zndi shortcodes#5i3ns enable/disable the category filter https //docs wpgmaps com/zndi shortcodes#wfyaz override β€˜opening infowindow links in a new tab’ setting https //docs wpgmaps com/zndi shortcodes#avvc1 separate visitor generated markers form from map https //docs wpgmaps com/zndi shortcodes#bdzle default shortcode to add your map to a page on your website, you will need to add the map shortcode to your wordpress post or page to find the map shortcode, please see the shortcode listed against the corresponding map record on the maps page wp go maps > maps you can copy and paste the shortcode shown to the far right in the list of your maps on the post or page where you want to display your map the shortcode framed in red wpgmza id="1" displays the map with id β€œ1” \[wpgmza id="1"] map mashup a map mashup allows you to join multiple maps into one map your shortcode for a map mashup will look something like this \[wpgmza id="2" mashup=true mashup ids="2,3" parent id="2"] you will need to use the shortcode parameters below to create your map mashup id the id parameter is the id of the main map (this must be the same as the parent id – so in the example above β€œ2” mashup set as true to indicate you that you would like this map to be a mashup mashup ids include the ids of all maps you want to β€œmashup” in a comma separated list parent id the parent id identifies the specific map from which the map settings will be drawn for the map mashup in this case, whatever color or size is set for map id 2 will be used for the mashup map category usage suppose you only want to show a certain marker category on your map you need to make sure that the category exists and that the category id is correct see wp go maps > categories to restrict your map to only the europe category, add the category id (6 in this example above) to your shortcode as follows \[wpgmza id="1" cat="6"] only the markers that have the europe category will be displayed on the map focus on a specific marker (at a specific zoom level) this can be achieved by adding the following parameters to your map shortcode marker accepts the marker id (number) you want to reference you can find the marker id in your marker listing wp go maps > maps (edit your chosen map) > markers zoom the zoom level you want for the map this is a number between 1 and 21 for example \[wpgmza id="1" marker="17" zoom="5"] enable/disable directions suppose you've enabled directions for a map using the wp go maps dashboard interface, but need to use the map without directions on a specific post or page simply include the enable directions parameter in your shortcode enable directions="1" will enable and enable directions="0" will disable directions \[wpgmza id="1" enable directions="1"] enable/disable the category filter suppose you’ve enabled a category filter for a map using the wp go maps dashboard interface, but need to use the map without the filter on a specific post or page simply include the enable category parameter in your shortcode enable category="1" will enable and enable category="0" will disable the category filters \[wpgmza id="1" enable category="0"] override β€˜opening infowindow links in a new tab’ setting if you've enabled opening infowindow links for a map in a new tab/window using the wp go maps dashboard interface, but need to change that setting on a specific post or page, you can simply include the new window link parameter in your shortcode new window link="yes" will enable and new window link="no" will disable the link opening in a new window \[wpgzma id="1" new window link="yes"] separate visitor generated markers form from map if you'd like to have your visitor generated marker form appear on a separate page from your map, you can use the wpgmza vgm form link to map="1" shortcode please note, however, that his shortcode requires the visitor generated markers addon paste the following shortcode on the page where you want the vgm form \[wpgmza vgm form link to map="map id" redirect to="page link"] wpgmza vgm form link to map – the map id you'd like your markers to be added to (required) redirect to – the url of the page where the visitor will be redirected to, after adding the marker (optional) if the redirect to attribute directs to the map where the marker was added, remove the vgm form on that page by adding the following attribute to the map shortcode disable vgm form="1" \[wpgzma id="1" disable vgm form="1"]