| 开发者 | williqs |
|---|---|
| 更新时间 | 2026年9月1日 05:43 |
| PHP版本: | 7.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
type shortcode attribute or the site-wide default in Settings → Xtreme Locator:
zip — a single zip/postal code field (the original default).zip_distance — zip code plus a distance/radius field.international — a country dropdown plus a postal code field, powered by Xtreme Locator's own country-picker script.near_me — a single "Locations Near Me" button that uses the visitor's browser location (no typing required).searchByCountryJS.php) targets fixed field IDs, so a second instance on the same page would conflict with the first.searchByCountryJS.php or api/search.js scripts directly (they didn't return readable source through my tools), so the International and Near Me search types are implemented based on the embed code you provided plus reasonable assumptions about how those scripts behave. Please test both after installing — in particular, confirm the International search box still submits to your own site rather than being redirected elsewhere by Xtreme Locator's script, and that the Near Me results page renders a proper results page inside the iframe rather than raw data.<form>/<input>/<select> elements a search form needs. Only paste code from a source you trust. A relative <form action="..."> is automatically resolved against app.xtremelocator.com and results are routed into an iframe instead of navigating away, but surrounding markup (labels, layout, a stray "Back" link, etc.) is left exactly as pasted — trim a full copied page down to just the form and its buttons before pasting for the cleanest result.[xtreme_locator_search] to any page or post, or add the "Xtreme Locator Search" widget to a sidebar.Yes. This plugin is the WordPress integration for Xtreme Locator's location search service; it needs a Site ID from an Xtreme Locator account to know which locations to search. Start a free trial if you don't have one — the free plan supports up to 15 locations at no cost.
Yes, Xtreme Locator's free plan supports up to 15 locations. Larger location counts require a paid plan — see xtremelocator.com for pricing.
Most likely no Site ID has been entered yet. Site admins will see a short setup reminder in place of the search box; other visitors simply won't see anything until it's configured. Go to Settings → Xtreme Locator and enter your Site ID.
The search box itself is plain HTML — no iframe. After a visitor searches, the results are shown on your own site inside a sandboxed iframe pointed at Xtreme Locator, so the results (which can include a map or other embedded script) stay isolated from the rest of your page.
Yes. Add the shortcode with a type attribute wherever you like, e.g. [xtreme_locator_search type="near_me"]. The one exception is the "International" search type, which can only appear once per page (see Known Limitations).
Plugin Name header and this readme's title) — cosmetic only, the plugin's directory slug/URL (xtreme-locator-search) and everything else are unchanged.sid setting, shortcode attribute, and everywhere else it's referenced are unchanged.jquery script handle, which most themes have already printed in <head> by the time a shortcode runs — and wp_add_inline_script() silently does nothing once its target handle has already been printed, so the fix never loaded no matter what the pasted embed code looked like. It's now attached to this plugin's own dedicated handle (loaded in the footer, after the shortcode has definitely run), the same technique already used by the "Near Me" script elsewhere in this plugin. Verified this time that the script tag itself is actually present in the rendered page.!important, which no CSS rule — however specific or !important — can out-rank; only editing the element's own inline style directly can, so this is handled by the same runtime script as the centering fix above.margin: auto) can't center it — it just hangs off the container's right edge. The Custom Search Form's search box and results iframe now use a centering technique that works correctly even when the box is wider than the column it sits in.<table> or <form> with its own fixed width (common in older Xtreme Locator embed markup) was silently overriding it. Both are now forced to fill (not exceed) the box, so the width setting actually controls what's visible.[xtreme_locator_custom_search] shortcode.target attribute — no parsing of the form's individual fields is required, so any field set works.<form action="..."> in the pasted code (e.g. findLocations.php) is automatically resolved against app.xtremelocator.com.<script> tags in the pasted code are stripped automatically; everything else is output as entered. This field is admin-only (Settings page, manage_options) and is intentionally not run through WordPress's usual HTML sanitization, since that would strip the <form>/<input>/<select> elements a search form needs — documented in both the field description and this readme.wp_enqueue_script() instead of being printed as a raw <script> tag.uninstall.php so the plugin's one stored option is removed when the plugin is deleted (not just deactivated).wp_add_inline_script() instead of a raw inline <script> tag.show_powered_by shortcode attribute. The "Powered By XtremeLocator" credit link can now only be enabled from the site admin's own Settings → Xtreme Locator checkbox — not overridable via shortcode, so only the administrator's explicit action can turn it on.<form> elements (e.g. for comment/contact forms), which was leaking into the search box since the plugin's own box styling lives on an inner wrapper, not the outer <form> tag. The outer element now explicitly resets border/background/box-shadow so only this plugin's own settings (or none, by default) show.postal_unavailable_text shortcode attribute) whenever Xtreme Locator's own script disables that field for the selected country.type attribute.dist_label, dist_placeholder, country_label, near_me_button_text.<table> to a semantic, flexbox-based layout for cleaner styling and better responsiveness.