You don’t need to manually set shortcode options to get a map on your site – you can do this easily using the shortcode wizard.
In case you do need to manually edit any shortcode options the full range of options available are below:
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:
1 |
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:
1 |
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:
1 |
categoriesaslist="true" |
categoriesmultiselect
Allow users to selecte multiple categories at the same time.
Default: true
Example:
1 |
categoriesmultiselect="true" |
Categoriesmatchall
Does a location need to match all selected categories to be shown (setting to true makes the selection AND rather than OR).
From 3.10.4
Default: false
Example:
1 |
categoriesmatchall="true" |
Clustermarkers
Cluster the markers together.
Default: false
Example:
1 |
clustermarkers="true" |
Clustermaxzoomlevel
This option sets how close you have to be before the clustering disappears.
Default: 15
Example:
1 |
clustermaxzoomlevel="10" |
Clustergridsize
Used to calculate the clustering (normally doesn’t need adjusting).
Default: 50
Example:
1 |
clustergridsize="100" |
Country
Used as a search suffix. This is helpful for when you want to restrict searches to one area.
Default: [empty]
Example:
1 |
country="UK" |
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:
1 |
daycategorymode="true" |
Defaultzoom
This can be used to override the starting zoom level of the map – it only works when used with a fixed starting position (startlatlong). Without this the zoom level will be calculated to show all visible locations.
Default: [empty]
Example:
1 |
defaultzoom="8" |
Defaultdirectionsmode
What mode to use for the directions. Options are DRIVING, BICYCLING, TRANSIT, WALKING.
Default: DRIVING
Example:
1 |
defaultdirectionsmode="WALKING" |
disablescroll
Disable the mouse scrollwheel when hovering over the map.
Default: false
Example:
1 |
disablescroll="true" |
expandsingleresult
If only one location is showing expand it automatically.
Default: true
Example:
1 |
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:
1 |
fullpageviewenabled="false" |
Geoenabled
Allow the map to automatically find the location of the user.
Default: false
Example:
1 |
geoenabled="true" |
hideaddress
This hides the address in the list items.
Default: false
Example:
1 |
hideaddress="true" |
Hidefilter
This hides the category filter button.
Default: false
Example:
1 |
hidefilter="true" |
hideinfowindow
This hides the infowindows on the map. Clicking locations will still select them in the list if enabled.
Default: false
Example:
1 |
hideinfowindow="true" |
hidefilterbar
This hides the all of the sorting, filtering, and search options in one go.
Default: false
Example:
1 |
hidefilterbar="true" |
Hidesort” => “false”,
This hides the sort button.
Default: false
Example:
1 |
hidesort="true" |
Hidesearch” => “false”,
Hide the search box.
Default: false
Example:
1 |
hidesearch="true" |
Hidecategoriesonitems
Hide the categories list on each item.
Default: false
Example:
1 |
hidecategoriesonitems="true" |
hideuntilsearch
Hides all of the list items until a search is performed.
Default: false
Example:
1 |
hideuntilsearch="true" |
Hideviewdetailbuttons
Hides the view detail button in the infowindow pop ups on the map.
Default: false
Example:
1 |
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:
1 |
homelocationid="10" |
Infowidth
Sets the width of the infobox as a percentage of the map width at page load.
Default: 70
Example:
1 |
infowidth="30" |
Infoheight
Sets the height of the infobox as a percentage of the map height at page load.
Default: 70
Example:
1 |
infoheight="30" |
Imageheight
Sets the height of the featured image in px.
Default: 100
Example:
1 |
imageheight="300" |
Imagewidth
Sets the width of the featured image in px.
Default: 100
Example:
1 |
imagewidth="300" |
Initiallyselectedcategories
A comma separated list of category slugs that should start selected when the map loads.
Default: [empty]
Example:
1 |
initiallyselectedcategories="catslug1,catslug2,catslug3" |
Initialsorttype
How to sort the map initially. Options are title, distance, category (by category order on icon page), categorytitle.
Default: title
Example:
1 |
initialsorttype="distance" |
Initialmaptype
What type of map to show initially. Options are ROADMAP, SATELLITE, HYBRID, and TERRAIN.
Default: ROADMAP
Example:
1 |
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:
1 |
keepzoomlevel="true" |
Locationsperpage
How many locations to show on each page in the list.
Default: 3
Example:
1 |
locationsperpage="10" |
Locationstoshow
A list of location id’s to show on the map/list.
Default: [empty]
Example:
1 |
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:
1 |
limitresults="5" |
Maximumposts
By default Map List Pro limits the number of locations retrieved from the database for a single map to 2000. This can be increased by specifying a limit, or the limit can be removed by setting this to -1.
Default: 2000
Example:
1 |
maximumposts="-1" |
Mapposition
Where the map should sit in relation to the list. Options are above, leftmap, or rightmap.
Default: above
Example:
1 |
mapposition="leftmap" |
menushideonselect
Make the sort and category menus hide after an item is selected
Default: true
Example:
1 |
menushideonselect="false" |
Openinnew
Should the view detail buttons open in a new window.
Default: false
Example:
1 |
openinnew="true" |
Selectedzoomlevel
What zoom level to use when clicking on a location.
Default: [empty]
Example:
1 |
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:
1 |
searchdistances="5,10,15,20,25" |
Showdirections
Allows you to show/hide the directions field in locations.
Default: true
Example:
1 |
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:
1 |
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:
1 |
simplesearch="true" |
Startlatlong
The starting centrepoint for the map entered as latitude and longitude separated by a comma. To use this option you will also need to set the default zoom level for the map (defaultzoom). Lat/lng should be entered in decimal format.
Default: false
Example:
1 |
startlatlong="43.671,-79.380" |
Sortcategoriesby
This lets you set the ordering of the categories in the dropdown. “Manual” lets you set the order by dragging and dropping the categories on the category icons page to set the preferred order.
Default: title
Example:
1 |
sortcategoriesby="manual" |
Streetview
Lets you turn streetview on or off on a map.
Default: true
Example:
1 |
streetview="false" |
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 in your theme’s functions.php:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
$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:
1 |
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:
1 |
viewstyle="accordion" |
From version 3.7