WP Store Locator 2.0 Released

The release of version 2.0 is a big milestone in the development of WP Store Locator. It fixes several bugs and issues from version 1.x and includes new features that enable developers to customize the store locator without having to change any of the core files.

Highlights

Custom post types
WP Store Locator no longer uses a custom db table to store the locations in. It now supports custom post types which allow you to easily add custom fields to the store page.

If you want to use individual store pages, then you first need to enable the permalinks. You can do this in the Permalink section on the WP Store Locator -> Settings page.

Underscore templates
The Underscore library is used to render template parts that hold store details on the frontend. This allows you to change the HTML structure and include custom store data through filters, without having to edit any of the core files.

This short guide shows you how to create a custom store field, include the data in the JSON response, and how to use the custom data in one of the templates.

New shortcodes
Support for three new shortcodes: [wpsl_map], [wpsl_hours] and [wpsl_address].

Custom map styles
You can add your custom map style by either writing your own style code, or you can use existing map styles from Snazzy Maps or Map Stylr.

WPML compatible
WP Store Locator is now 100% WPML compatible. You can read more on how to configure WPML here.

Other changes

  • New: The option to choose between different address formats and a filter to add custom ones.
  • New: The option to use the InfoBox library to style the info window.
  • New: The option to define a max location load if the auto loading of locations is enabled.
  • New: The option to set a max auto zoom level to prevent the auto zoom from zooming too far.
  • New: The option to set a different map type for the location preview.
  • New: A check to see if the SCRIPT_DEBUG constant is set, if this is the case the full scripts are loaded, otherwise the minified scripts are used.
  • New: A wpsl_thumb_size filter that enables you to set the thumb size on the frontend without editing CSS files.
  • New: The option to hide the search radius dropdown on the frontend.
  • New: A wpsl_geolocation_timeout filter.
  • New: The option to choose between two different effects when a user hovers over the result list.
  • New: Set the opening hours through dropdowns instead of a textarea.
  • New: The option to enable/disable scroll wheel zooming and the map type control on the map.
  • New: Added ‘Email’ and ‘Url’ to the labels on the settings page.
  • New: Added a general settings and documentation link to the plugin action links.
  • New: The option to hide the distance in the store listing.
  • New: Portuguese translation via Rúben Martins.
  • Changed: Better error handling for the Geolocation API.
  • Changed: Regardless of the selected template, the store map is always placed before the store list on smaller screens.
  • Changed: The wp-content/languages folder is checked for translations before using the translations in the plugin folder.
  • Changed: The ‘reset map’ button now uses an icon font and is placed on the right bottom corner together with a new ‘current location’ icon.
  • Changed: The cluster marker image will use HTTPS when available.
  • Changed: Increased the default timeout for the Geolocation API from 3000 to 5000 ms.
  • Changed: The geocode requests to the Google Maps API will always use HTTPS.
  • Changed: Instead of curl or file_get_contents the Google Maps API request will now use wp_remote_get.
  • Changed: Replaced the wpsl_capability filter with a Store Locator Manager role.
  • Changed: Added an extra check in JS to prevent the search radius or max results value being set to NaN.
  • Changed: The wpsl_templates filter now expects an id field to be present in the array.
  • Changed: Renamed the wpsl_gmap_api_attributes filter to wpsl_gmap_api_params.
  • Changed: Added the enableHighAccuracy parameter to the Geolocation request to make it more accurate on mobile devices.
  • Fixed: An issue that prevented the settings page from saving the changes on servers that used the mod_security module.
  • Fixed: The pan control option not working on the frontend if it was enabled on the settings page.
  • Fixed: Prevented an empty comma from appearing in the direction URL if the zip code didn’t exist.
  • Fixed: Modified the CSS to prevent themes hiding the map images.
  • Fixed: Dragging the store location marker in the store editor would sometimes return the incorrect coordinates.
  • Fixed: The dropdown fields not being restored to the default values after the ‘reset map’ button was clicked.
  • Note: Requires at least WP 3.7 instead of WP 3.5.

You can install WP Store Locator 2.0 from your WordPress Dashboard, or download it directly from WordPress.org.

Sign up for our newsletter