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 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:
| Attribute | Example | Description |
|---|---|---|
| lat | lat="51.50665" | Set latitude for the initial map position. |
| long | long="-0.12752" | Set longitude for the initial map position. |
| zoom | zoom="13" | Define the initial zoom level. |
| region | region="Europe" | Pre-select a region (must be enabled in settings). |
Content Filtering
Filter the displayed locations based on categories, users, or specific IDs:
| Attribute | Example | Description |
|---|---|---|
| types | types="food"types="food|drinks|hotel" | Filter locations by types (Marker Categories). Separate multiple types with a | symbol. |
| types-relation | types-relation="AND" | All types must match (AND). By default any type can match (OR). |
| ids | ids="123"ids="123|456|789" | Filter locations by Post ID. Separate multiple IDs with a | symbol. |
| date-filter | date-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-filter | custom-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-relation | custom-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:
| Attribute | Example | Description |
|---|---|---|
| size | size="default"size="fullwidth" | Set a custom map size for desktop. |
| size_mobile | size_mobile="square"size_mobile="landscape" | Set a custom size for mobile view. |
| height | height="400px" | Define a custom height for desktop (include units like px). |
| height_mobile | height_mobile="300px" | Define a custom height for mobile. |
| map_type | map_type="interactive"map_type="simple" | Enable or disable the “Add location” button. |
| map_style | map_style="Esri.WorldStreetMap" | Override the default map style. |
Features & Controls
Enable or disable specific map features:
| Attribute | Example | Description |
|---|---|---|
| disable_regions | disable_regions="true"disable_regions="false" | Enable or disable Regions. |
| enable_cluster | enable_cluster="true"enable_cluster="false" | Enable or disable marker clustering. |
| enable_searchbar | enable_searchbar="true"enable_searchbar="false" | Enable or disable the searchbar. |
| enable_searchaddress_button | enable_searchaddress_button="true"enable_searchaddress_button="false" | Enable or disable the “Search for Address (Geosearch)” button. |
| enable_searchmarkers_button | enable_searchmarkers_button="true"enable_searchmarkers_button="false" | Enable or disable the “Search for Markers” button. |
| hide_filterbox | hide_filterbox="true"hide_filterbox="false" | Hide the Marker Categories filterbox. |
| enable_advanced_filter | enable_advanced_filter="true"enable_advanced_filter="false" | Override the Advanced Filter Interface toggle for this shortcode, regardless of the global setting. |
| advanced_filter_layout | advanced_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_currentlocation | enable_currentlocation="true"enable_currentlocation="false" | Enable or disable the “Show me where I am” button. |
| enable_fullscreen | enable_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
titleimageaudiovideotype (Marker Categories)mapsubtitle (replaces the former "address" label)latlngroutetextvotesnotificationauthor_nameauthor_emailwp_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.
Display a Location Image Gallery
The [open-user-map-gallery] shortcode generates a gallery of location images.
Available Attributes
| Attribute | Example | Description |
|---|---|---|
| url | url="https://mysite.com/" | Link the images to another page. |
| number | number="10" | Limit the number of displayed images. |
| user | user="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
| Attribute | Example | Description |
|---|---|---|
| user | user="current" | Filter locations by user. Accepts “current”, a user ID, or “role:rolename”. |
| types | types="food|drinks" | Filter by marker categories. Separate multiple types with a | symbol. |
| types-relation | types-relation="AND" | All types must match (AND). By default any type can match (OR). |
| ids | ids="123|456" | Filter by location IDs. Separate multiple IDs with a | symbol. |
| date-filter | date-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-filter | custom-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-relation | custom-fields-filter-relation="AND" | Relation between multiple custom field filters. Default is AND. Set to OR if any filter group should match. |
| sort | sort="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. 🚀