This plugin can be used to list locations. It adds a custom post type for locations, which can be manipulated via the admin panel. The locations can be displayed on a map and in a table. In addition, a search field can be added that allows users to search for relevant locations.
The functionality is added to a page or post via shortcodes:
The settings can be configured by passing attributes to the shortcodes, like so:
[smooth-location-map width=”500px” height=”300px” …more attributes]
None of the attributes are required. The following attributes are available:
- width: defaults to “500px”
- height: defaults to “300px”
- center: defaults to “37.752530,-122.447777”
- geolocation: defaults to “false”
- maptype: defaults to “HYBRID”
- zoom: defaults to 7
- icon_url: url for different icon image
- shadow_url: url for shadow of different icon image
The same functionality is available via do_action() calls with the same name as the shortcode.
In addition, the following filters are available to modify the HTML output, if necessary:
- Upload the
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Place the relevant shortcodes on your posts/pages:
- Add your locations in the admin panel under ‘Locations’
Alternatively, place the relevant do_action() calls in your theme/plugin.
How do I change the center of the map?
Set the “center” attribute for the smooth-location-map shortcode:
How do I enable geolocation?
Set the “geolocation” attribute for the smooth-location-map shortcode:
How do I change the width and height?
Set the “width” and “height” attributes for the smooth-location-map shortcode.
How do I change the map type?
Set the “maptype” attribute for the smooth-location-map shortcode. You can choose from the following types:
How do I change the placeholder for the search field?
Set the “placeholder” attribute for the smooth-location-search shortcode.
Can you extend this plugin to do X?
Yes we can, send us an e-mail.
Contributors & Developers
“Smooth Locations” is open source software. The following people have contributed to this plugin.
- Find geocodes by clicking on a integrated map
- Support for custom markers
- Add map type select
- Adjust initial zoom level of the embedded map
- Initial release