GD > Location Switcher
All Widgets come as Widgets, Shortcodes or Blocks. Learn more about our Super Duper Widgets.
For the best results, it is recommended to add the location switcher to the main menu.
The Location Switcher is used to filter listings to a specific location such as a country, region, city or to order listings by proximity to a user-entered position such as a zipcode or a landmark. The switcher displays the current location the listings are being filtered to, it can also be used to clear the current location by hovering over the marker icon to reveal the X to clear.
Major Features
The widget adds Location Switcher to the frontend. Location Switcher comes with several useful features, such as:
- Automatic location suggestions based on your location - Opening the Location Switcher presents a list of nearest cities based on proximity to user's location.
- AJAX-based location suggestions - As the user types a location's name, the Switcher automatically searches for it and suggests possible results.
- Fallback proximity search - If a search returns zero results from the directory's database, Location Manager extension will automatically geocode the search text and provide lists of location suggestions from Google API or OSM API. Users can then do a proximity search for that location.
- Saved search history - Opening the Location Switcher again shows recent search results for quick access.
- Near Me - Filter and order listings by proximity to your current location.
- REST API - All queries made by the Location Switcher are via the WordPress REST API.
Widget Options
- Title - The title for the widget.
Example Output
Default output, with custom title "Switch Locations":
Upon clicking, the Location Switcher pops up: