Shortcodes

The Waymark Shortcode allows you to embed Maps in your content.

Once created, Maps and Collections can be embedded within your content by simply adding the Shortcode.


Using the Shortcode

The Shortcode is simply a text placeholder that tells Waymark what to display.

It can be added to any content in WordPress that supports shortcodes.

For example, this Shortcode will display the Map with an ID of 1649:

Waymark map_id="1649"

This Shortcode will display the same Map, but with a different Basemap and zoom level:

Waymark map_id="1649" basemap="Satellite" map_zoom="11" 

This Shortcode will display all Maps in the Collection with an ID of 27:

Waymark collection_id="27"

To display a Basemap without any data, simply provide centre coordinates and zoom level, like this:

Waymark map_centre="54.526814,-3.017289" map_zoom="16" basemap="Satellite"

Shortcode Parameters

The Shortcode can be passed the following parameters.

ParameterValueDescription
map_idMap IDDisplay a single Map. You can create Maps (and obtain Map IDs) in WP Admin > Waymark > Maps.
collection_idCollection IDDisplay all Maps in a Collection. You can create Collections (and obtain Collection IDs) in WP Admin > Waymark > Collections.
map_centreLatitude,LongitudeThe initial centre coordinates of the Map. By default Waymark centres the Map so all Data is visible.
map_zoom0-18The initial zoom of the Map. By default Waymark zooms the Map so all Data is visible.
basemapBasemap NameWhich Basemap to display when the Map first loads (instead of the default). The value must match a Basemap Name listed in WP Admin > Waymark > Settings > Basemaps.
map_heightNumber of pixelsSpecify the desired height of the Map. The default can be changed in WP Admin > Waymark > Settings > Misc.
shortcode_header0 or 1Whether to display the Shortcode Header (if Meta exists for the Map). The default can be changed in WP Admin > Waymark > Settings > Misc.
show_gallery0 or 1Whether to display an image gallery for Markers that have images associated with them. The default can be changed in WP Admin > Waymark > Settings > Misc.
show_filter0 or 1Whether to display the Overlay Filter. This enables visitors to filter for which Markers, Lines and Shapes are currently visible on the Map. The default can be changed in WP Admin > Waymark > Settings > Misc.


Parent page: