CM Maps Route Manager (CMMRM) - Shortcodes

Shortcodes

All plugins shortcodes can be found on the Admin Dashboard  CM Maps Routes Manager  Shortcodes.You can display routes on pages and posts using these shortcodes.

Route Snippet

By adding the shortcode [route-snippet id="1702" featured="image"], we are able to embed 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 image.

  • Shortcode: [route-snippet] - displays route's 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 - show featured image or map.
    • layout - specifies the layout. Options are either list 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.

Map for a specific route

We can add a single map with the specified route.

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

  • Shortcode: [route-map] - displays route's 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 (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

Map with multiple routes

We can display all routes or filter them by category, type or difficulty.

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

  • Shortcode: [cm-routes-map] - displays the routes map. Optionally from chosen category, difficulty, route type with the elevation graph and\or route params visible.
  • Shortcode attributes:
    • category - filter routes by category: id or slug
    • author - filter routes by author: id or slug
    • 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
    • "taxonomy_key" - you can use any route's custom taxonomy key, for example: cmmrm_route_type=123. You can manage custom taxonomies on the Settings page under the Taxonomies tab.

My routes table

The my-routes Shortcode 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 controls=1 addbtn=1]
  • Attributes:
    • controls - set "0" to hide the "Edit" and "Delete" buttons. Default is "1".
    • addbtn - set "0" to hide the "Add route" button. Default is "1".

Common Map with Routes Integration

This shortcode displays a common map with locations and routes from the  CM Map Routes Manager as well as the Maps Locations plugin. You need to have both of them installed.

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


More information about the CM Map Routes Manager WordPress  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