With the Location Manager add-on, GeoDirectory builds a page for every country, region and city that has listings. Visitors can pick a country, then a region, then a city, and see only the listings there. You don’t need custom queries for this.
Show a list of locations to pick from
The GD > Locations widget (shortcode [gd_locations]) lists your locations with links to their pages. Its “Show Locations” setting chooses the level:
[gd_locations what="country"]lists countries[gd_locations what="region"]lists regions[gd_locations what="city"]lists cities
By default the list is filtered by the current location. So a regions list placed on your location page shows the regions of the country the visitor is viewing, and a cities list shows the cities of the current region. Set “Output type” to Image Grid if you want pictures instead of a plain list. All options are in GD > Locations.
Build the pages
- Go to GeoDirectory > Settings > General > Pages and edit the page set as Location page.
- Add GD > Locations blocks for the levels you want, along with GD > Categories and GD > Listings if you want categories and listings for the current location.
- Link to the location page from your menu, or add country links to your home page with
[gd_locations what="country"].
Once a visitor is in a location, category links point to that category inside the same location, so they keep seeing local listings.
Let visitors switch location from anywhere
The location switcher lets people pick a country, region or city from a dropdown in your menu or a sidebar. See how to add the location switcher to menus and widgets.
If you are setting up Location Manager for the first time, start with the Location Manager setup guide.