Plugin / Simple Locator

Kyle Phillips

Description

Description

Why use Simple Locator?

Simple locator is ideal for developers who are looking for a way to implement location search for any post type. Simple locator is different in that it allows the selection of any existing custom fields for use as the geocoded data sources.

Don’t have an existing post type with geocoded latitude and longitude fields? Simple Locator includes a default “Locations” post type with fields for latitutde, longitude, address, phone number, website, & more. This post type’s name and labels are configurable through the plugin settings.

Simple Locator also offers developer-friendly options for adding custom Google Maps styling. Select from an existing list, leave the default styles, or add your own JSON styles.

Using Simple Locator

  1. Add locations. This can either be the included “locations” post type or an existing custom post type with existing geocoded fields. Locations can also be imported in bulk using the included CSV importer.
  2. Use the Shortcode [wp_simple_locator] or Widget to display a search form. The shortcode offers more options for map and form customization.

For more information visit locatewp.com.

Important: Simple Locator requires WordPress version 3.8 or higher, and PHP version 5.4 or higher.

More Information

Shortcode Options

The shortcode to display the form and results is [wp_simple_locator]. There are several options available for customizing the form and results:

  • distances – A comma separated list of numbers used to ustomize the list of available distances to choose from in the form
  • mapheight – The height of the map in pixels
  • mapcontainer – The unique ID of a custom container in which to load the map.
  • resultscontainer – The unique ID of a custom container in which to load the search results.
  • buttontext – Text to display in submit button
  • addresslabel – Customize the address form label
  • mapcontrols – Hide or show the map controls
  • mapcontrolsposition – Google Maps formatted position for map controls (ex: TOP_LEFT)
  • placeholder – Customize the search input placeholder text (added in v1.3.0)
  • noresultstext – Customize the text displayed if no results are returned (added in v1.3.0)
  • ajax – To disable AJAX form submission, use ajax=”false”. NOTE: custom map/results containers are not available for non-AJAX forms (added in v1.3.0)
  • perpage – Used in conjunction with AJAX option. If a perpage option is included in a non-AJAX form, the results will be displayed with simple pagination, limited to the number per page specified. (Ex: ajax=”false” perpage=”15″). Pagination is not available with AJAX forms. (added in v1.3.0)
  • taxonomies – To include taxonomy filters in the search form, use a comma-separated list of taxonomy names/slugs. The form will include select menus for each of the taxonomies specified. (AJAX only)
  • allowemptyaddress – Set as “true” to allow empty address fields to be submitted (useful for returning all locations regardless of the user-specified location)

Visit locate.wp for more detailed information.

Widget Use

Options include the title, distance options, and the map height. To use the widget outside of a predefined sidebar area, use the following function in your template, as outlined in the WordPress documentation. The widget name is SimpleLocator\Widgets\Form (must include namespaces).

Form Options

To enable Google Places autocomplete in the search form, visit Settings > Simple Locator > General, and select the “Enable Autocomplete in Search” option. Your form will now include an autocomplete dropdown populated by the Google Places API.

Singular View

By default, a map of the location is added to the content on singular views. To remove this feature, update the setting under Simple Locator > General Settings.

Extending & Customizing Map Display

A number of JavaScript functions are provided to extend and customize the map results. Visit locatewp.com for a list and usage details.

Filters

For a complete description of available filters and example usage, see the plugin website.

  • simple_locator_form($output, $distances, $taxonomies, $widget) – Customize the search form HTML
  • simple_locator_result($output, $result, $count) – Customize the result output within the result list
  • simple_locator_infowindow($infowindow, $result, $count) – Customize the display of results within the Google Maps infowindow
  • simple_locator_post_fields() – Add additional fields to the search parameters (field names for $_POST data)
  • simple_locator_sql_select($sql) – Add additional fields to the SELECT sql query during search
  • simple_locator_sql_join($sql) – Join additional fields in the sql query during search
  • simple_locator_sql_where($sql) – Add additional WHERE parameters to the sql query during search

Ratings

4.8
16 reviews

Rating breakdown

Details Information

Version

1.5.6

First Released

10 Dec, 2015

Total Downloads

16,388

Wordpress Version

3.8 or higher

Tested up to:

4.6.16

Require PHP Version:

-

Tags

Contributors

Languages

The plugin hasn't been transalated in any language other than English.

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.