| 开发者 | softiconai |
|---|---|
| 更新时间 | 2026年12月4日 17:57 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
npm install and npm run build.
No. The map uses OpenStreetMap, which needs no key and no account.
Yes: Every setting, explained (2:06). Jump to a part:
The empty block, the CSV import and the Help panel in the block's settings link to it too.In the block itself. Select the block and open the Stores panel in the sidebar: add a store, fill in its address, and press Find on map. You can also click on the map to place a store, or drag its orange pin.
One store per row, with the column names in the first row. The block recognises common names such as name, address, city, postcode (or zip), country, phone, email, website, category (several in one cell, separated by commas, semicolons or |), hours, schedule (opening times as Mo-Fr 09:00-18:00; Sa 10:00-14:00), lat (or latitude) and lng (or lon, longitude), and you can match any other column yourself. Commas or semicolons both work. Save the sheet as "CSV UTF-8" so accents stay right. If the file has no coordinates, press Find the places of … stores after the import. See an import in the video.
Place search is free but not perfect, especially for new streets or some countries. Open the store and drag its orange pin to the right spot, or type the latitude and longitude. Stores found without their postcode are marked in the list so you can check them. See it in the video.
Up to 500. For more, add a second Store Locator block, for example one per country.
Yes, with a synced pattern. Select the block, open the ⋮ menu in the block toolbar, choose Create pattern, give it a name and keep Synced on. Then add it to any page from the block inserter (Patterns → My patterns). To change the stores, select the pattern on any page and click Edit original: every page that uses it changes at once. The map, search, categories, Open now and the schema.org data work in every copy, even with two copies on one page.
It sets no cookies and tracks nothing. Turn on Load the map on click in the Map settings so nothing is loaded from OpenStreetMap until the visitor asks, and mention OpenStreetMap in your privacy policy. You can also turn off the place search for visitors. See it in the video.
OpenStreetMap's own tile server is meant for light use. For a busy site, set the address of another tile server in the block's Map settings (many providers offer free plans), with the credit they ask for.
Yes. The block uses no AJAX calls, and it finds its own files even when an optimization plugin combines or moves its scripts.
Give a store its opening times in its form: tick the days, set the times, and add a second time for a lunch break. A closing time at or before the opening time means after midnight (22:00 to 02:00). The times are read in your site's time zone (Settings › General), and each visitor's browser works out whether the store is open, so it stays right on cached pages and needs no server. Choose Badge and button, Badge only or None under Open now in the block's Search settings. The opening hours text shown on the page is separate; Write the shown text from these times fills it for you.
Yes. Every store in the list is marked up as a schema.org LocalBusiness with its name, address, phone, email, website, picture, coordinates and opening times, so search engines such as Google can read your stores. Nothing to set up. If your SEO plugin already describes your business, both can stay on the same page.
Yes: pick a picture (your logo or an icon) in Colors and marker. Or keep the pin and choose its color, one for all stores or one per category under Pin color by category. A store with several categories takes the color of its first one that has a color.
Use the alsl_config filter. For example, to use another tile server and geocoder on the whole site:
add_filter( 'alsl_config', function ( $config ) { $config['tiles'] = 'https://tiles.example.com/{z}/{x}/{y}.png'; $config['geocoder'] = 'https://geocoder.example.com/search'; return $config; } );
The geocoder must answer like Nominatim's /search (JSON) or Photon (GeoJSON).