前言介紹
- 這款 WordPress 外掛「Simple Locator」是 2015-01-01 上架。 目前已經下架不再更新,不建議安裝使用。
- 目前有 600 個安裝啟用數。
- 上一次更新是 2024-12-13,距離現在已有 141 天。
- 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
- 有 16 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
locator | location | store map | Google Maps | Store locator |
內容簡介
為什麼要使用 Simple Locator?
Simple Locator 適合開發人員尋找實現任何文章類型的位置搜尋的方法。它與其他插件不同之處在於可允許使用現有的自訂欄位作為地理位置資料來源。
沒有存在帶有經緯度座標欄位的文章類型嗎?Simple Locator 包含一個預設的「位置」文章類型,其包含經度、緯度、地址、電話號碼、網站等欄位。此文章類型的名稱和標籤可由插件設置進行配置。
Simple Locator 還提供開發人員友好的選項以添加自定義的 Google Maps 樣式。可從現有列表中選擇,使用預設樣式或添加自己的 JSON 樣式。
使用 Simple Locator
新增位置。這可以是包含經緯度座標欄位的預設「位置」文章類型或現有的自訂文章類型。也可以使用包括的 CSV 匯入工具進行批量匯入位置。
使用 Shortcode [wp_simple_locator] 或 Widget 來顯示搜尋表單。短碼提供更多的地圖和表單自定義選項。
詳細資訊請訪問locatewp.com。
重要提示:Simple Locator 要求 WordPress 版本 3.8 或更高版本,並且 PHP 版本 5.4 或更高。
更多資訊
短碼選項
顯示表單和結果的短碼為 [simple_locator]。有多個選項可用於自定義表單和結果:
distances - 一個逗號分隔的數字列表,用於自定義表單中可選擇的距離列表。預設為 5,10,20,50,100。
mapheight - 地圖高度(像素)。預設為 250。
mapcontainer - 自定義容器的唯一 ID,用於加載地圖(HTML 元素的 ID 參數)。
resultscontainer - 自定義容器的唯一 ID,用於加載搜索結果(HTML 元素的 ID 參數)。
buttontext - 提交按鈕上要顯示的文字內容。預設為「搜索」(Search)。
addresslabel - 自訂地址表單標籤
mapcontrols - 隱藏或顯示地圖控件
mapcontrolsposition - Google 地圖格式化的控件位置(例如:TOP_LEFT)
showgeobutton - 是否顯示「使用我的位置」按鈕。在不包含 https 連接的網站上會隱藏此按鈕。預設為 false。
geobuttontext - 如果顯示,自定義地理位置按鈕的文字內容。預設為「使用我的位置」(Use My Location)。
ajax - 是否使用 ajax 請求提交表單。預設為 true。
formmethod - 表單提交的方法。預設為「post」。如果使用 GET 方法進行非 AJAX 請求,必須指定結果頁面。
placeholder - 自定義搜尋輸入框的 placeholder 內容。預設為「輸入位置」(Enter a Location)
noresultstext - 自定義未返回結果時顯示的文字內容。預設為「未返回結果」(No results found)。
ajax - 要禁用 AJAX 表單提交,使用 ajax=”false”。注意:非 AJAX 表單不可使用自定義地圖/結果容器(自 v1.3.0 新增)
perpage – 與 AJAX 選項一起使用。如果非 AJAX 表單中包含 perpage 選項,則結果將顯示簡單的分頁,限制為指定的每頁數量。 (如:ajax=”false” perpage=”15″)。 AJAX 表單不支援分頁功能。
resultspage - 如果正在提交非 AJAX 表單(請參閱
原文外掛簡介
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
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.
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 [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.
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
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
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Simple Locator」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 | 1.0.1 | 1.0.2 | 1.0.3 | 1.0.4 | 1.0.5 | 1.0.6 | 1.0.7 | 1.0.8 | 1.0.9 | 1.1.0 | 1.1.1 | 1.1.2 | 1.1.3 | 1.1.4 | 1.1.5 | 1.2.0 | 1.2.1 | 1.3.0 | 1.3.1 | 1.4.0 | 1.5.0 | 1.5.1 | 1.5.2 | 1.5.3 | 1.5.4 | 1.5.5 | 1.5.6 | 1.5.7 | 2.0.2 | 2.0.3 | 2.0.4 | trunk | 1.0.10 |
延伸相關外掛(你可能也想知道)
My Calendar – Accessible Event Manager 》My Calendar 是一款 WordPress 活動管理外掛,提供豐富的自定義事件顯示方式。本外掛支援在 WordPress Multisite 中建立個別的事件日曆,按類別、地點或作者...。
Easy Google Maps 》WordPress Easy Google Maps, , WordPress 簡易 Google 地圖, 如何使用簡易 Google 地圖, 簡易 Google 地圖演示, , 使用 WordPress 繪製易於 Google 地圖,只...。
Weather Atlas Widget 》氣象小工具演示(多個實時網站), , marbella-tennis-lessons.com, arsbc.com, morethangolfmarrakech.co.uk, airciu.com, aviemoreadvisor.com, ballinghamb...。
If-So Dynamic Content Personalization 》個性化任何內容!根據訪客的個人資料或與網站的互動添加或替換內容。, 無需編程!, 創建動態內容的四種方式, , 條件觸發器-適用於每個頁面生成器-查看, 條件G...。
Oi Yandex.Maps for WordPress 》注意!, 當您升級外掛到版本3.1.6時,它將被停用並顯示“找不到檔案”的錯誤 - 別擔心,只需重新啟用該外掛程式,...。
Custom Content by Country (by Shield Security) 》來自 Shield 安全插件團隊的Custom Content by Country擴充套件,, 提供您基於用戶所在區域(如有提供)的位置,選擇顯示/隱藏內容的選項。, 透過簡單的Short...。
If-So Conditional Content for Elementor 》### 總結:輕鬆個性化,就在 Elementor 內部, - 輕鬆為訪客打造個性化體驗,根據位置、行為、搜索關鍵詞等動態調整 Elementor 頁面。, - 針對每位訪客量身定...。
Nearby Now Reviews and Audio Testimonials 》Nearby Now for WordPress 是將即時的Nearby Now評論和報到,以及引人注目的互動服務區域熱點地圖添加到您的網站上的絕佳方法。使用此外掛可有五種顯示方式:,...。
Meks Easy Maps 》Meks Easy Maps 最初是我們的 Trawell WordPress 主題 的一個功能,但現在它可用於任何 WordPress 網站。, 透過 Meks Easy Maps WordPress 外掛,您可以透過 ...。
Embed Google Map 》Embed Google Map 是一款在 WordPress 文章、頁面、文字小工具以及模板中嵌入一個或多個 Google 地圖的外掛。添加地圖非常簡單,只需將您想在地圖上顯示的位...。
BP xProfile Location 》此外掛可與「BuddyPress」和「BuddyBoss 平台」搭配使用。它會建立「xProfile 位置」欄位類型,使用 Google Places API 來填寫和驗證會員檔案上的地址欄位。,...。
Geolocation 》Geolocation 外掛允許 WordPress 使用者在「編輯文章」頁面或任何支援地理位置功能的 WordPress 行動應用程式 (例如:WordPress for iPhone/iPad、WordPress ...。
Address Geocoder 》Address Geocoder 外掛可讓您將經緯度附加到您的文章、頁面和自訂文章類型中。在編輯畫面上,只需在 metabox 中輸入地址並點擊"Geocode"。, 此外掛程式使用 G...。
Themify Store Locator 》Themify Store Locator 外掛讓你可以在地圖、列表或網格視圖中顯示無限數量的地點。每個店家地點都可以插入自己的自訂描述、地址、聯絡電話和營業時間。當使...。
VenoMaps – Geo maps and custom markers 》這個外掛程式可以創建自訂地圖並將其放置在任何位置:聯繫頁面、文章、側邊欄、頁腳小工具或直接插入您的佈景主題檔案中!, 選擇自訂樣式和地圖大小,上傳自...。