Shortcodes

No of shorcode available for this plugin: 02

01. Shortcode to display a map [cbxgooglemap]

The shortcode has different params and they are explained below.

param name default value possible values
id No default value Map can be loaded using the custom post type map or without post type. So, use this param value as map post type id to load the map from the config of the post. Otherwise keep empty
maptype roadmap 'roadmap', 'satellite', 'hybrid', 'terrain'
width If empty then 100% numeric value, ‘%’ accepted, no ‘px’, if only numeric value, then px will be added automatically, if empty will be taken from post meta if available
height If empty then 300 Nemeric value, no ‘px’, if empty value will be taken from post meta if available
zoom 8 if empty then from post meta if available
lat No default value lattitude value, if empty from post meta , required(at least should be in post meta)
lng No default value lattitude value, if empty from post meta , required(at least should be in post meta)
heading No default value used for info window title, if empty will be used from post tile if available
address No default value used for info window content, if empty will be taken from post meta if available
scrollwheel 1 1 enable , 0 disable, default 1 or comes from default config
showinfo 1 1 enable , 0 disable, default 1 or comes from default config
infow_open 1 1 enable , 0 disable, default 1 or comes from default config
website No default value Website url that is linked to Place name in popup info window, leave empty to ignore
website No default value Website url that is linked to Place name in popup info window, leave empty to ignore
mapicon No default value Map icon url, if empty then will take from meta

01. Shortcode to display multiple maps as archive with distance search [cbxgooglemapprods]

Params Default value Possible values
display both map, list, both
limit -1 -1 or any positive numeric value
search any text or string/keyword for searching the title, content, excerpt
filter_box 1 1(show) or 0(hide)
distance_unit km km(kilometers) or ml(miles)
default_distance 10 any positive numeric value
default_lat any latitude value , float number, if empty then it will not be distance search but regular listing with map or as configured, but not as distance search or sort by distance.
default_lng longitude – rest is same as latitude
default_zoom 15 0 -19 for openstreetmap, for google map same 0 – 19
category_filter 1 1(show) or 0(hide) . Depends on global configuration if category feature is enabled
default_cat 0 Any specific category id, if you use category feature create category and check their id, if want to skip then use 0 or don’t use the param

Note: This is page’s documentation is completed.

Last modified: February 27, 2024