Shortcodes Guide

The Open User Map plugin provides several Shortcodes to display locations, filter content, and customize the map’s appearance and functionality.

👉 You can find a list of the currently available Shortcodes and their attributes for your plugin version in the plugin settings ( Open User Map > Settings > Help & Getting Started ).

This guide outlines the available Shortcodes and their attributes.

Basic Shortcode for Displaying the Map

To display the map with all locations, use the following shortcode:

[open-user-map]

If integrating into a theme file, use:

PHP
<?php echo do_shortcode('[open-user-map]'); ?>

This will display the default map as configured in the plugin settings.

Shortcode Attributes

Map Position & View

Customize the map’s initial position and zoom level:

AttributeExampleDescription
latlat="51.50665"Set latitude for the initial map position.
longlong="-0.12752"Set longitude for the initial map position.
zoomzoom="13"Define the initial zoom level.
regionregion="Europe"Pre-select a region (must be enabled in settings).

Content Filtering

Filter the displayed locations based on categories, users, or specific IDs:

AttributeExampleDescription
typestypes="food"
types="food|drinks|hotel"
Filter locations by types (Marker Categories). Separate multiple types with a | symbol.
types-relationtypes-relation="AND"All types must match (AND). By default any type can match (OR).
idsids="123"
ids="123|456|789"
Filter locations by Post ID. Separate multiple IDs with a | symbol.
date-filterdate-filter="after:2025-10-03"
date-filter="before:2025-11-03"
date-filter="2025-11-03"
date-filter="after:2025-10-03;before:2025-11-03"
Filter by date using keywords. Use after:YYYY-MM-DD for newer than, before:YYYY-MM-DD for older than, a bare YYYY-MM-DD for an exact day, or combine with semicolons for a range. Uses modified or created date based on your settings.
user (PRO)user="current"
user="123"
user="role:subscriber"
Filter locations by user. Use “current” to show only locations from the currently logged-in user, a specific user ID, or “role:rolename” to show locations from users with a specific role.
custom-fields-filtercustom-fields-filter="Color:Red|Blue:OR; Size:M"
custom-fields-filter="Website:https\://example.com"
Filter locations by custom field values. Format: LABEL:VALUE1|VALUE2:RELATION. Multiple filters separated by semicolon. RELATION defaults to OR. To include a colon in a value (e.g., URLs), escape it with a backslash, e.g. https\://example.com.
custom-fields-filter-relationcustom-fields-filter-relation="AND"
custom-fields-filter-relation="OR"
Relation between multiple custom field filter groups. Default is AND (all groups must match). Set to OR if any group may match.

Display & Appearance

Customize the map’s size and layout:

AttributeExampleDescription
sizesize="default"
size="fullwidth"
Set a custom map size for desktop.
size_mobilesize_mobile="square"
size_mobile="landscape"
Set a custom size for mobile view.
heightheight="400px"Define a custom height for desktop (include units like px).
height_mobileheight_mobile="300px"Define a custom height for mobile.
map_typemap_type="interactive"
map_type="simple"
Enable or disable the “Add location” button.
map_stylemap_style="Esri.WorldStreetMap"Override the default map style.

Features & Controls

Enable or disable specific map features:

AttributeExampleDescription
disable_regionsdisable_regions="true"
disable_regions="false"
Enable or disable Regions.
enable_clusterenable_cluster="true"
enable_cluster="false"
Enable or disable marker clustering.
enable_searchbarenable_searchbar="true"
enable_searchbar="false"
Enable or disable the searchbar.
enable_searchaddress_buttonenable_searchaddress_button="true"
enable_searchaddress_button="false"
Enable or disable the “Search for Address (Geosearch)” button.
enable_searchmarkers_buttonenable_searchmarkers_button="true"
enable_searchmarkers_button="false"
Enable or disable the “Search for Markers” button.
hide_filterboxhide_filterbox="true"
hide_filterbox="false"
Hide the Marker Categories filterbox.
enable_advanced_filterenable_advanced_filter="true"
enable_advanced_filter="false"
Override the Advanced Filter Interface toggle for this shortcode, regardless of the global setting.
advanced_filter_layoutadvanced_filter_layout="left"
advanced_filter_layout="right"
advanced_filter_layout="button"
advanced_filter_layout="panel"
Force a specific Advanced Filter layout (sidebar, button, or panel) just for this shortcode.
enable_currentlocationenable_currentlocation="true"
enable_currentlocation="false"
Enable or disable the “Show me where I am” button.
enable_fullscreenenable_fullscreen="true"
enable_fullscreen="false"
Enable or disable the fullscreen mode.

Complete Examples

Example 1: Map of London Showing Only Food Locations

[open-user-map lat="51.50665" long="-0.12752" zoom="13" types="food" size="fullwidth" height="500px"]

Example 2: Simple Map Showing Only the Current User’s Locations (PRO)

[open-user-map map_type="simple" user="current" enable_fullscreen="true" enable_searchbar="false"]

Example 3: Interactive Map for a Specific Region with Custom Appearance

[open-user-map region="Europe" map_type="interactive" height="600px" enable_cluster="false" enable_currentlocation="true"]

Additional Shortcodes

Just the Form

Display the “Add Location” form inline instead of within a popup. The form will be displayed directly on the page without the map.

[open-user-map-form]

Display Specific Location Data

The [open-user-map-location] shortcode allows you to display details from a specific location.

Usage

[open-user-map-location value="title" post_id="12345"]

Available Values

  • title
  • image
  • audio
  • video
  • type (Marker Categories)
  • map
  • subtitle (replaces the former "address" label)
  • lat
  • lng
  • route
  • text
  • votes
  • notification
  • author_name
  • author_email
  • wp_author_id
  • Custom fields (Use the field label)

If post_id is omitted, it will use the current post.

Add a format="object" attribute to return JSON data without wrapper div. Perfect for embedding in HTML attributes or custom JavaScript. If “value” attribute is provided, returns that single value as an object. If no “value” attribute is provided, returns all location data as an object.

The [open-user-map-gallery] shortcode generates a gallery of location images.

Available Attributes

AttributeExampleDescription
urlurl="https://mysite.com/"Link the images to another page.
numbernumber="10"Limit the number of displayed images.
useruser="current"
user="123"
user="role:subscriber"
Filter images by user. Accepts “current”, a user ID, or “role:rolename”.

Example Usage

[open-user-map-gallery number="10" user="current"]

Display a List of Locations

The [open-user-map-list] shortcode generates a paginated list of locations.

Available Attributes

AttributeExampleDescription
useruser="current"Filter locations by user. Accepts “current”, a user ID, or “role:rolename”.
typestypes="food|drinks"Filter by marker categories. Separate multiple types with a | symbol.
types-relationtypes-relation="AND"All types must match (AND). By default any type can match (OR).
idsids="123|456"Filter by location IDs. Separate multiple IDs with a | symbol.
date-filterdate-filter="after:2025-10-03"Filter by date using keywords. Use after:YYYY-MM-DD for newer than, before:YYYY-MM-DD for older than, a bare YYYY-MM-DD for an exact day, or combine with “;” for ranges. Uses modified or created date based on settings.
custom-fields-filtercustom-fields-filter="Color:Red|Blue:OR;Size:M"Filter by custom field values. Format: LABEL:VALUE1|VALUE2:RELATION. Multiple filters separated by semicolon. RELATION defaults to OR. To include a colon in a value (e.g., URLs), escape it with a backslash like Website:https\://example.com
custom-fields-filter-relationcustom-fields-filter-relation="AND"Relation between multiple custom field filters. Default is AND. Set to OR if any filter group should match.
sortsort="Title:DESC"Sort list view by title, date, or custom field label. Format: FIELD:ORDER (ASC or DESC), e.g. sort="Date:ASC" or sort="Custom Field Label:DESC".

Example Usage

[open-user-map-list user="current" types="food|drinks"]

Summary

The Open User Map plugin provides flexible shortcodes for displaying and filtering maps, customizing layouts, and adding extra features like galleries and location lists. Use the attributes outlined above to tailor the output to your needs.

For additional customization, explore the plugin settings under Open User Map > Settings in your WordPress dashboard. 🚀

Was this article helpful?

Related Articles


Add a New Location

Edit Location

Marker Category
Access
Rating

Add up to 5 images to create a gallery for this location.

×
EN