I have been looking to get a country->state->city setup for a location directory we’re building.
Have tested plugins such as https://github.com/Beee4life/acf-city-selector, but spotted that the ACF Google Maps field actually has a lot of data (street, city etc) segmented now. This is great as in the admin we can get country->state->city as well as street, all in one function and then output the data we need.
What I would like to do, is create archive pages for countries, states and cities. For example:
https://example.com/cpt-slug/germany/ <- country
https://example.com/cpt-slug/germany/brandenburg/ <- state
https://example.com/cpt-slug/germany/brandenburg/potsdam/ <- city
For each archive page, you would see a list of the posts in that country, state or city. I have been trying to figure out how to create rewrites for this, but not quite sure how it could be done – has anyone done something similar?