Normally you shouldn’t need to manually create or edit the shortcode, but if you do, below is a list of all of the available shortcode attributes along with what they do and examples. A few of these haven’t made it into the shortcode wizard yet, and can only be set manually. The default shortcode which shows all locations looks like this:
[maplist simplesearch=”true” locationsperpage=”3″]
Categories
A list of categories (by ID) to show on this map. Leave blank to show all locations.
Default: [empty]
Example:
categories="10,14,19"
Categoriesticked
Start with the categories in the dropdown ticked. Some people prefer it this way round in UI terms.
Default: false
Example:
categoriesticked="true"
Categoriesaslist
Display the category filter as a list of buttons below the search box. This option really helps if you have a large number of categories to filter by.
Default: false
Example:
categoriesaslist="true"
categoriesmultiselect
Allow users to selecte multiple categories at the same time.
Default: true
Example:
categoriesmultiselect="true"
Clustermarkers
Cluster the markers together.
Default: false
Example:
clustermarkers="true"
Clustermaxzoomlevel
This option sets how close you have to be before the clustering disappears.
Default: 15
Example:
clustermaxzoomlevel="10"
Clustergridsize
Used to calculate the clustering (normally doesn’t need adjusting).
Default: 50
Example:
clustergridsize="100"
Country
Used as a search suffix. This is helpful for when you want to restrict searches to one area.
Default: [empty]
Example:
categories="10,14,19"
Daycategorymode
If you create categories named after the days of the week, this will filter the locations to just show locations in the categories matching the current day.
Default: false
Example:
daycategorymode="true"
Defaultzoom
The staring zoom of the map. Leave blank for it to be auto-calculated.
Default: [empty]
Example:
defaultzoom="8"
Defaultdirectionsmode
What mode to use for the directions. Options are DRIVING, BICYCLING, TRANSIT, WALKING.
Default: DRIVING
Example:
defaultdirectionsmode="WALKING"
expandsingleresult
If only one location is showing expand it automatically.
Default: true
Example:
expandsingleresult="false"
Fullpageviewenabled
Enable the View location button on each location. There is also a global setting for this in the settings page.
Default: true
Example:
fullpageviewenabled="false"
Geoenabled
Allow the map to automatically find the location of the user.
Default: false
Example:
geoenabled="true"
Hidefilter
This hides the category filter button.
Default: false
Example:
hidefilter="true"
hidefilterbar
This hides the all of the sorting, filtering, and search options in one go.
Default: false
Example:
hidefilterbar="true"
Hidesort” => “false”,
This hides the sort button.
Default: false
Example:
hidesort="true"
Hidesearch” => “false”,
Hide the search box.
Default: false
Example:
hidesearch="true"
Hidecategoriesonitems
Hide the categories list on each item.
Default: false
Example:
hidecategoriesonitems="true"
hideuntilsearch
Hides all of the list items until a search is performed.
Default: false
Example:
hideuntilsearch="true"
Hideviewdetailbuttons
Hides the view detail button in the infowindow pop ups on the map.
Default: false
Example:
hideviewdetailbuttons="true"
Homelocationid
Allows you to set one location as the centre of the map. All other locations will then be listed with their distance away from this location.
Default: [empty]
Example:
homelocationid="10"
Initialsorttype
How to sort the map initially. Options are title or distance.
Default: title
Example:
initialsorttype="distance"
Initialmaptype
What type of map to show initially. Options are ROADMAP, SATELLITE, HYBRID, and TERRAIN.
Default: ROADMAP
Example:
initialmaptype="HYBRID"
Keepzoomlevel” => false,
This option allows the user to stay zoomed in after selecting a location. Normally the map zoom back put when the location list item of infowindow is closed.
Default: false
Example:
keepzoomlevel="true"
Locationsperpage
How many locations to show on each page in the list.
Default: 3
Example:
locationsperpage="10"
Locationstoshow
A list of location id’s to show on the map/list.
Default: [empty]
Example:
locationstoshow="10,14,19"
Limitresults
This option restricts the number of locations that are shown to a user at any point. It can be used to just show the nearest X locations from a users location when used in conjunction with the geoenabled option.
Default: -1
Example:
limitresults="5"
Mapposition
Where the map should sit in relation to the list. Options are above, leftmap, or rightmap.
Default: above
Example:
mapposition="leftmap"
menushideonselect
Make the sort and category menus hide after an item is selected
Default: true
Example:
menushideonselect="false"
Openinnew
Should the view detail buttons open in a new window.
Default: false
Example:
openinnew="true"
Selectedzoomlevel
What zoom level to use when clicking on a location.
Default: [empty]
Example:
selectedzoomlevel="10"
Searchdistances
This allows you to edit the dropdown list of distances that are used for filtering on location enabled searches.
Default: 10,15,20,25,30,35
Example:
searchdistances="5,10,15,20,25"
Showdirections
Allows you to show/hide the directions field in locations.
Default: true
Example:
showdirections="false"
Showthumbnailicon
Enabling this option makes the featured image on the location get used in place of the small map icon.
Default: false
Example:
showthumbnailicon="true"
Simplesearch
Set the search mode to use. Options are true (text only search), false (location based search), and combo (text and location search).
Default: false
Example:
simplesearch="true"
Startlatlong
The starting centrepoint for the map entered as latitude and longitude separated by a comma. Lat/lng should be entered in decimal format.
Default: false
Example:
startlatlong="43.671,-79.380"
Categoriesticked
Start with the categories in the dropdown ticked. Some people prefer it this way round in UI terms.
Default: false
Example:
categoriesticked="true"
Usealltaxonomies
From version 3.6.0
Adds a filter to the front end for every taxonomy added to the maplist post type. To add additional taxonomies use code like this:
$categoryargs2 = array(
‘labels’ => array(
‘label’ => __( ‘map2’ ),
‘rewrite’ => array( ‘slug’ => ‘map2’ ),
‘hierarchical’ => true,
),
‘public’ => true,
‘show_in_nav_menus’ => true,
‘show_ui’ => true,
‘show_tagcloud’ => false,
‘hierarchical’ => true,
‘rewrite’ => true,
‘query_var’ => true
);
register_taxonomy( ‘map_location_categories_2’, array(‘maplist’), $categoryargs2 );
Default: false
Example:
usealltaxonomies="true"
Viewstyle
Changes how the map and list is displayed. Options are “both” (show the map and list), “listonly” (only show the list), “maponly” (only show the map), and accordion (show the map and list, with the list in an accordion grouped by category).
Default: both
Example:
viewstyle="accordion"
From version 3.7