Skip to main content

Classic editor (shortcode)

Use the MapSVG shortcode in the Classic editor, custom HTML fields, widgets, or anywhere WordPress accepts shortcodes.

For the block editor or Elementor with live preview, see Gutenberg block and Elementor widget.

Copy the shortcode

  1. Open the MapSVG start screen
  2. Find your map and click the copy button next to the shortcode

Copy shortcode from start screen

You can also open the map settings page and copy the shortcode from the top toolbar:

Copy shortcode from map toolbar

Paste into a page

  1. Create or edit a WordPress page in the Classic editor
  2. Paste the shortcode into the content area, or use the MapSVG button in the toolbar and select one of your created maps - that will insert the shortcode automatically.
  3. Publish or update the page and open it on the front end

Shortcode reference

[mapsvg id="1"]
AttributeRequiredDescription
idYesMap ID from the MapSVG start screen / toolbar.
selectedNoRegion ID to pre-select when the map loads (spaces become _). Example: [mapsvg id="1" selected="US"].
lazyNoSet to true to lazy-load the map: [mapsvg id="1" lazy="true"].