Skip Navigation

[Resolved] Guidance on how to setup Location relationships

This support ticket is created 3 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.


What is the best way to add Location information to a custom post type?

Currently, my custom post type "Listing" includes a custom field type of ADDRESS. The ADDRESS field contains the complete address including City, State, Zip, Country.

But I would like to be able to create a dropdown filter to search by State & City using the "Filter by post relationship"

Do I need to create custom post types "State" & "City"?

How did you accomplish this on the real estate site in the following documentation:

It's also vaguely covered here on your documentation page:

What is the link to your site?
hidden link


In the Real Estate site, the "State" and "City" information are managed separately from the address custom field information. The information returned from the geolocation API is not split apart into separate components, like city and state. In the Real Estate site, City and State are both custom post types, and there is a one-to-many relationship between States and Cities. There is also a one-to-many relationship between Houses and Cities. So this creates a chained one-to-many post relationship, like Grandparent > Parent > Child. This is how the State and City filters are implemented in the House search View.

If you create a free account at, you will be able to create a sandbox Real Estate site to see how it's all put together.