Use the GD > Locations block, widget or shortcode from the Location Manager add-on. It lists countries, regions (states) or cities, and on a region’s page it can list just the cities in that region.
Regions and cities aren’t taxonomies or custom fields. Location Manager keeps its own list of countries, regions and cities, built from your listings’ addresses, and GD > Locations reads from that list.
List all states
[gd_locations what="region" no_loc="1"]
what="region" lists regions. no_loc="1" stops it filtering by the location the visitor is currently viewing, so you always get the full list.
List the cities in a state
Add this to your Location page, the page set at GeoDirectory > Settings > General > Pages > Location page:
[gd_locations what="city"]
When a visitor opens a region, for example by clicking the region in the breadcrumb, the widget picks up the current region and lists only its cities. On the main Location page with no region chosen, it lists all cities.
To list the cities of one particular state anywhere else on your site, give the region slug, and the country slug if the same region name exists in more than one country:
[gd_locations what="city" country="united-states" region="texas"]
Display options
output_type="grid"shows an image grid instead of a list.per_pagesets how many locations show on each page. Leave it blank or use0to show all.what="neighbourhood"lists neighbourhoods, if you use them.
In GeoDirectory v1 this was done with the Popular Locations widget. Today GD > Locations replaces it. See GD > Locations for every setting.