Simple Locator

Por Kyle Phillips
(16 avaliações)
Baixar

Hospedagem WordPress com plugin Simple Locator

Onde posso hospedar o plugin Simple Locator?

Este plugin pode ser hospedado em qualquer hospedagem que possua WordPress instalado. Recomendamos escolher uma hospedagem confiável, com servidores especializados para WordPress, como o serviço de hospedagem de sites da MCO2.

Hospedando o plugin Simple Locator em uma empresa de hospedagem de confiança

A MCO2, além de instalar o WordPress na versão mais atual para seus clientes, disponibiliza o WP SafePress, um mecanismo exclusivo que assegura e aumenta a performance do seu site conjuntamente.

Por que a Hospedagem WordPress funciona melhor na MCO2?

A Hospedagem WordPress funciona melhor pois a MCO2 possui servidores otimizados para WordPress. A instalação de WordPress é diferente de uma instalação trivial, pois habilita imediatamente recursos como otimização automática de imagens, proteção da página de login, bloqueio de atividades suspeitas diretamente no firewall, cache avançado e HTTPS ativado por padrão. São recursos que potencializam seu WordPress para a máxima segurança e o máximo desempenho.

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.

Mais informações

Shortcode Options

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

  • distances – A comma separated list of numbers used to customize the list of available distances to choose from in the form. Defaults to 5,10,20,50,100
  • mapheight – The height of the map in pixels. Defaults to 250.
  • mapcontainer – The unique ID of a custom container in which to load the map (ID parameter of HTML element).
  • resultscontainer – The unique ID of a custom container in which to load the search results (ID parameter of HTML element).
  • buttontext – Text to display in submit button. Defaults to “Search”.
  • addresslabel – Customize the address form label
  • mapcontrols – Hide or show the map controls
  • mapcontrolsposition – Google Maps formatted position for map controls (ex: TOP_LEFT)
  • showgeobutton – Whether to show or hide the “Use My Location” button. This button is hidden on sites that do not include an https connection. Defaults to false.
  • geobuttontext – Customize the text content of the geolocation button if shown. Defaults to “Use My Location”.
  • ajax – Whether to submit the form with an ajax request. Defaults to true.
  • formmethod – The method of which the form submits. Default to “post”. If using a GET method with a non-ajax request, a results page must be specified.
  • placeholder – Customize the search input placeholder text. Defaults to “Enter a Location”
  • noresultstext – Customize the text displayed if no results are returned. Defaults to “No results found”.
  • 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.
  • resultspage – If a non-ajax form is being submitted (see ajax option), a separate results page may be specified.
  • 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)
  • taxonomy_field_type – If taxonomy fields are displayed, the field type may be either “select” or “checkbox”. Defaults to “select”.
  • allowemptyaddress – Set as “true” to allow empty address fields to be submitted (useful for returning all locations regardless of the user-specified location)
  • showall – Whether to show all locations on page load. Defaults to false.

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.

Filtros

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
  • simple_locator_form_in_results($display_form) – Whether to show the form in results (bool)
  • simple_locator_all_locations_text($text) – Filter the text output of “All Locations”
  • simple_locator_map_pin_single($html) – Filter the single view map pin
  • simple_locator_js_map_options($options) – Filter the Javascript options passed to Google Maps for map display
  • simple_locator_autocomplete_js_options($options) – Filter the Javascript options passed to the Google Maps Autocomplete API
  • simple_locator_form_taxonomies($taxonomies) – Filter the taxonomies displayed in the search form

Capturas de tela

<p>Display a simple, AJAX-enabled locator form using a shortcode or widget.</p>

Display a simple, AJAX-enabled locator form using a shortcode or widget.

<p>Form results load without page refresh. Customize the results & map containers if needed.</p>

Form results load without page refresh. Customize the results & map containers if needed.

<p>The included ">

The included "location" post type includes custom fields specific to locations.

<p>Includes options for Google Maps API Key, measurement unit (miles/kilometers), custom map pin image, whether to output the included CSS, whether to display the map in the specified post type's singular view, and option to add a geolocation button on enabled devices.</p>

Includes options for Google Maps API Key, measurement unit (miles/kilometers), custom map pin image, whether to output the included CSS, whether to display the map in the specified post type's singular view, and option to add a geolocation button on enabled devices.

<p>Use the included post type and latitude/longitude fields, or specify your own existing combination of type and fields. Works with Advanced Custom Fields. Ideal for developers looking for a customizable location search.</p>

Use the included post type and latitude/longitude fields, or specify your own existing combination of type and fields. Works with Advanced Custom Fields. Ideal for developers looking for a customizable location search.

<p>Choose from a list of pre-defined map styles, and optionally customize the Google Maps options object.</p>

Choose from a list of pre-defined map styles, and optionally customize the Google Maps options object.

<p>Or, paste your own JSON formatted styles.</p>

Or, paste your own JSON formatted styles.

<p>Optionally show a default map on page load, with a custom location. Additionally, results can be set to show automatically on page load if the user's device or browser has geolocation capabilities. If the user doesn't, or they deny location access, the default map will show if set to.</p>

Optionally show a default map on page load, with a custom location. Additionally, results can be set to show automatically on page load if the user's device or browser has geolocation capabilities. If the user doesn't, or they deny location access, the default map will show if set to.

<p>Configure results display by adding custom fields from the chosen post type plus post data including the title, permalink, excerpt and thumbnails.</p>

Configure results display by adding custom fields from the chosen post type plus post data including the title, permalink, excerpt and thumbnails.

<p>Import locations in bulk from a CSV file. Locations will be automatically geocoded using the Google Maps Geocode API (Import functionality requires PHP version 5.4+ and a valid Google Maps API key with the Geocoding API enabled).</p>

Import locations in bulk from a CSV file. Locations will be automatically geocoded using the Google Maps Geocode API (Import functionality requires PHP version 5.4+ and a valid Google Maps API key with the Geocoding API enabled).

Plugins semelhantes

SiteOrigin Widgets Bundle
(132 avaliações)

Essential elements for modern websites. Add buttons, sliders, heroes, maps, images, carousels, features, icons, more. Create dynamic pages easily.

WP Go Maps (formerly WP Google Maps)
(2.896 avaliações)

The easiest to use Google maps plugin! Create a custom Google map, map block, store locator or map widget with high quality markers containing categor …

WP Maps – Display Google Maps Perfectly with Ease
(114 avaliações)

Show Google Maps on your site with WP Maps. Enjoy easy settings for unlimited maps and precise locations.

Store Locator WordPress
(49 avaliações)

Agile Store Locator is a premium store finder plugin designed to offer you immediate access to all the best stores in your local area.

InLocation
(1 avaliação)

Create a map in GoogleMaps with location you want (marks), show with shortcode

Simple Business Directory
(61 avaliações)

Business Directory plugin. MULTIPURPOSE with Google Maps or OpenStreetMap for STAFF Directory, Store LOCATOR, Employee Directory, Company Directory

Do mesmo author (Kyle Phillips)

Nested Pages
(124 avaliações)

Nested Pages provides a drag and drop interface for managing pages & posts in the WordPress admin, while maintaining quick edit functionality.

Favorites
(130 avaliações)

Favorites for any post type. Easily add favoriting/liking, wishlists, or any other similar functionality using the developer-friendly API.