WordPress Travel Map Plugin (CMMRM) - Shortcodes


Shortcodes

Back to User Guides

TIP: What Are Shortcodes

Shortcodes add dynamic content to your site via a small piece of code.

Learn more: Shortcodes - How To Use | Finding ID of Post/Page/Other Content

All WordPress Travel Map plugin shortcodes can be found on the Admin Dashboard â†’ CM Maps Routes Manager Pro â†’ Shortcodes. You can display routes on pages and posts using these shortcodes.

Plugin shortcodes list - WordPress Plugin Show Route
Plugin shortcodes list

Route Snippet

Allows embedding a snippet of a single trail into a post. Optionally, change the featured parameter from "image" to "map" if you want to display a map instead of an image.

  • Shortcode: [route-snippet]
  • Shortcode attributes:
    • id - route ID. Note: The route_id is a number found in the URL when you edit a trail that identifies the route.
    • featured - featured image to show, one of image or map.
    • layout - specifies the layout. Options are either lists or tiles.
    • fancy - show fancy style: enter 1 for yes and 0 for no.
    • params- show route's parameters: enter 1 for yes and 0 for no.

Example: [route-snippet id="1702" featured="image"]

Route snippet - Route Display WordPress
Route snippet

Map for a specific route

Displays a single map with the specified route.

  • Shortcode: [route-map]
  • Shortcode attributes:
    • id - route ID.
    • graph - show elevation graph: entering 1 enables the graph, entering 0 disables it.
    • params - show routes' parameters: enter 1 to enable the route's parameters, enter 0 to disable them.
    • map - show map: 1 to enable, 0 to disable.
    • topinfo - show info on the top: 1 to enable, 0 to disable.
    • showdate - show creation date: 1 to enable, 0 to disable.
    • showtitle - show title: 1 to enable, 0 to disable.
    • showtravelmode - show travel mode switch controls: 1 to enable, 0 to disable.
    • zoom - set the map zoom from 1 (the entire world) to 20 (buildings)
    • width - set the widget's width in pixels
    • mapwidth - set the map width in pixels
    • mapheight - set the map height in pixels

Example: [route-map id=1702 graph=1 params=1]

Map for a specific route - Route Display Plugin
Map for a specific route

Map with multiple routes

Displays all routes or filter them by category, type or difficulty.

  • Shortcode: [cm-routes-map]
  • Shortcode attributes:
    • category - filter routes by category: id or slug
    • author - filter routes by author id or slug
      • You can also filter routes by custom taxonomies key for example: [cm-routes-map cmmrm_route_type=bicycle]. You can manage custom taxonomies on the Settings page under the Taxonomies tab.
    • params - show route's parameters: 1 to enable, 0 to disable
    • width - set the widget's width in pixels
    • mapwidth - set the map width in pixels
    • mapheight - set the map height in pixels

Example: [cm-routes-map category=united-states]

Map with multiple routes - Travel Plugins For WordPress
Map with multiple routes

My Routes Table

Displays a table with the current user's routes - the same as in the front-end user's dashboard index page.

  • Shortcode: [my-routes-table]
  • Attributes:
    • controls - set "0" to hide the "Edit" and "Delete" buttons. The default is "1".
    • addbtn - set "0" to hide the "Add route" button. The default is "1".

Example: [my-routes-table controls=1 addbtn=1]

User dashboard - Travel Map Plugin
User dashboard

Route Author

Displays the route's author display name.

  • Shortcode: [route-author]
  • Attributes:
    • id - route ID.

Example: [route-author id=123]

Route author - WordPress Plugins For Travel Website
Route author

Displays the link to the author's routes archive.

  • Shortcode: [route-author-link]
  • Attributes:
    • id - route ID.

Example: [route-author-link id=123]

Route author link - WordPress Plugins For Travel Blogs
Route author link

Route Author URL

Displays the URL of the author's routes archive.

  • Shortcode: [route-author-url]
  • Attributes:
    • id - route ID.

Example: [route-author-url id=123]

Route author URL - Travel Map WordPress Plugin
Route author URL

Route Description

Displays the route's description.

  • Shortcode: [route-description]
  • Attributes:
    • id - route ID.

Example: [route-description id=123]

Route description - Add WordPress Plugin Of Travel Map
Route description

Route Gallery

Displays the route's images gallery.

  • Shortcode: [route-gallery]
  • Attributes:
    • id - route ID.

Example: [route-gallery id=123]

Route gallery - WordPress + Map Show Route Between Markers
Route gallery

Route Elevation Graph

Displays the elevation graph for the route.

  • Shortcode: [route-elevation-graph]
  • Attributes:
    • id - route ID.

Example: [route-elevation-graph id=123]

Route elevation graph - WordPress Travel Map Plugin
Route elevation graph

Route Locations

Displays the route's locations list.

  • Shortcode: [route-locations]
  • Attributes:
    • id - route ID.

Example: [route-locations id=123]

Route locations - WordPress Plugin Show Route
Route locations

Route Parameters

Displays the route's parameters.

  • Shortcode: [route-params]
  • Attributes:
    • id - route ID.
    • fancy - show fancy style: enter 1 for yes and 0 for no.
    • fancyborder - show fancy border style: enter 1 for yes and 0 for no.

Example: [route-params id=123]

Route parameters - Route Display WordPress
Route parameters

Route Map Canvas

Displays the route's map.

  • Shortcode: [route-map-canvas]
  • Attributes:
    • id - route ID.
    • zoom - set the map zoom from 1 (entire world) to 20 (buildings)
    • showtravelmode - show travel mode switch controls: 1 to enable, 0 to disable.
    • cmlocations - whether to display placemarks of the locations from WordPress Interactive Map plugin, if you also installed this plugin, 1 to enable, 0 to disable. The default value is dependent on the plugin settings.

Example: [route-map-canvas id=123]


Route Toolbar

Displays the route's toolbar.

  • Shortcode: [route-toolbar]
  • Attributes:
    • id - route ID.

Example: [route-toolbar id=123]

Route toolbar - Route Display Plugin
Route toolbar

Route Travel Modes

Displays the route's travel mode switch.

  • Shortcode: [route-travel-modes]
  • Attributes:
    • id - route ID.

Example: [route-travel-modes id=123]

Route travel modes - Travel Plugins For WordPress
Route travel modes

Route Voting

Displays the route's rating stars that allow voting.

  • Shortcode: [route-voting]
  • Attributes:
    • id - route ID.

Example: [route-voting id=123]

Route voting - Travel Map Plugin
Route voting

Route Categories Loop

Displays the list of the route's categories.

  • Shortcode: [route-categories-loop]
  • Attributes:
    • id - route ID.
    • tax - categories' taxonomy (default is cmmrm_category)

Optionally you can pass the shortcode's content as a template for a single item of the categories list in order to adjust it by using the internal helper shortcodes (listed below). By default it's {link}

Internal helper shortcodes:

  • {term_id} - displays term ID
  • {term_taxonomy_id} - displays term taxonomy ID
  • {name} - displays term name
  • {slug} - displays term slug
  • {description} - displays term description
  • {url} - displays an URL address to the route's archive page filtered by this category
  • {link} - displays a link to the route's archive page filtered by this category

Example:

[route-categories-loop id=123]

{link}: {description}

[/route-categories-loop]

Route categories loop - WordPress Plugins For Travel Website
Route categories loop

Route Index

Displays the route's index page.

  • Shortcode: [cm-route-index]
  • Attributes:
      • Filtering parameters (used to restrict which routes are shown)
        • category - category's ID or slug
        • routetype- route type's ID or slug
        • tag- route tag ID or slug
        • author - author's ID or slug
        • search - filter routes by a string that will be searched in the route's title and description
      • View parameters (used to change the interface of the index)
        • showmap - whether to show the map (1 to enable, 0 to disable). The default value is dependent on the plugin settings.
        • showlist - whether to show the routes list (1 to enable, 0 to disable). The default is 1.
        • showfilters - whether to show the filtering options (1 to enable, 0 to disable). The default is 1.
        • ajax - whether to use AJAX to move between pages and apply filters without refreshing entire page (1 to enable, 0 to disable). The default is 1.
        • listlayout - the layout of the routes' list (options: list, tiles). The default value is dependent on the plugin settings.
        • featuredimage - what featured image to show for a route on the list (options: image, map). 
          • Choose 'image' to show the first image from the route's gallery.
          • Choose 'map' to show the route's map thumbnail. The default value is dependent on the plugin settings.
        • fancy - whether to apply a fancy style (1 for yes or 0 for no). The default value is dependent on the plugin settings.
        • limit - max number of routes to show on the list. The default value is dependent on the plugin settings.
        • cmlocations - whether to display placemarks of the locations from WordPress Interactive Map plugin, if you also installed this plugin, 1 to enable, 0 to disable. The default value is dependent on the plugin settings.
        • width - set the widget's width in pixels.
        • mapwidth - set the map width in pixels.
        • mapheight - set the map height in pixels.
        • showonlybyparams - makes the index show only a specific route. Set as 1 in the page used for sharing routes. In technical terms, when enabled, the index will take the query of the URL in account

Example: [cm-route-index]

Route index - WordPress Plugins For Travel Blogs
Route index

Route Post Date

Displays the route's created date.

  • Shortcode: [route-post-date]
  • Attributes:
    • id - route ID.

Example: [route-post-date id=123]

Route post date - Travel Map WordPress Plugin
Route post date

Route Post Modified

Displays the route's modified date.

  • Shortcode: [route-post-modified]
  • Attributes:
    • id - route ID.

Example: [route-post-modified id=123]

Route post modified date - Add WordPress Plugin Of Travel Map
Route post modified date

Route Permalink URL

Displays the route's permalink URL.

  • Shortcode: [route-permalink-url]
  • Attributes:
    • id - route ID.

Example: [route-permalink-url id=123]

Route permalink URL - WordPress + Map Show Route Between Markers
Route permalink URL

Route Title

Displays the route's title.

  • Shortcode: [route-title]
  • Attributes:
    • id - route ID.
    • escape - whether to escape HTML special characters (1 to enable, 0 to disable). 

Example: [route-title id=123]

Route title - WordPress Travel Map Plugin
Route title

Route Post Data

Displays the raw post data for a route.

  • Shortcode: [route-post-data]
  • Attributes:
    • id - route ID.
    • col - column name (post_title, post_content etc.)
    • escape - whether to escape HTML special characters (1 to enable, 0 to disable). 

Example: [route-post-data id=123 col=post_modified]

Route post data - WordPress Plugin Show Route
Route post data

Route Post Meta

Displays the raw post meta value for a route.

  • Shortcode: [route-post-meta]
  • Attributes
    • id - route ID.
    • key - meta_key to receive
    • escape - whether to escape HTML special characters (1 to enable, 0 to disable). 

Example:  [route-post-meta id=123 key="_cmmrm_distance"]

Route post meta - Route Display WordPress
Route post meta

Route Custom Taxonomy

Displays the raw post custom taxonomies for a route.

  • Shortcode: [route-custom-taxonomy]
  • Attributes
    • id - route ID.
    • key - meta_key to receive

Example:  [route-custom-taxonomy id=123 key="cmmrm_route_type"]


Common Map with Locations Integration

Displays a common map with locations and routes from the WordPress Travel Map plugin as well as the WordPress Interactive Map plugin.

Note: You must have both of these plugins installed to use this shortcode.

  • Shortcode: [cmmrm-cmloc-common-map]
  • Attributes:
    • path - set "1" if you want to display path or "0" if not.
    • categoryfilter - Show/Hide category filter above the map.

Example: [cmmrm-cmloc-common-map path=0 categoryfilter=0]

Locations and Routes on the common map - Route Display Plugin
Locations and Routes on the common map

Route Search

Shows a search form to find routes.

  • Shortcode: [route-search]
    • categories  - whether to show the categories filter (0 is no, 1 is yes). Default is 1.
    • customtax  - whether to show the custom taxonomies filter (0 is no, 1 is yes). Default is 1.
    • zipcode  - whether to show the zip code input field (0 is no, 1 is yes). Default is 1.
    • searchinput  - whether to show the search text input field (0 is no, 1 is yes). Default is 1.
    • searchstring  - set default search string entered to the search input. Default is empty.
  • Examples: 

    [route-search] - displays every search field

    Route search bar - Travel Plugins For WordPress
    Route search bar

    [route-search categories=0 customtax=0 zipcode=0 searchinput=1] - displays only the search input field

    Search bar - Travel Map Plugin
    Search bar

    [route-search categories=0 customtax=0 zipcode=1 searchinput=0] - displays only the zip code input field

    ZIP code search bar - WordPress Plugins For Travel Website
    ZIP code search bar

    [route-search categories=1 customtax=0 zipcode=0 searchinput=0] - displays only the list of the categories

    Categories filter - WordPress Plugins For Travel Blogs
    Categories filter

More information about the WordPress Travel Map Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.