In a project I worked on earlier this year, I needed a store locator on WordPress but couldn't find any satisfying plugin. It was either too complicated, didn't do what I wanted, or had tons of expensive add-ons. I decided to code my own using the awesome Advanced Custom Fields plugin and the great add-on for map location fields.
This is an extremely basic store locator, good for people who already use Advanced Custom Fields.
- Install Advanced Custom Fields if you haven’t already.
- Copy the folder acf-store-locator in your plugins directory.
- You will see a new “Stores” menu item in WordPress admin. Create stores here: title, content, image, use the location field to geocode the address.
- When you’re done adding stores, use the shortcode
[acf-store-locator]in any post or page to show the map.
- When visiting the store locator page, if your browser supports it, it will detect your location, if not, it will show the US.
- You can type a city name or a zip code and if a store exists in the location you’re typing, you will see an autocomplete.
- That’s it! Click on a marker to see the store details.
The plugin is available here: https://bitbucket.org/_karine/acf-store-locator.
Here are some screenshots of the plugin with theme Twenty Thirteen.