Title: Adding a secondary location variable
Last modified: September 1, 2019

---

# Adding a secondary location variable

 *  Resolved [jwozni2](https://wordpress.org/support/users/jwozni2/)
 * (@jwozni2)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/adding-a-secondary-location-variable/)
 * Is it possible to split up location to state and then city?
    WHen someone searches,
   they would be asked about the location (state). Once the state is selected how
   would I go about adding a secondary location list for cities? So that the search
   can be narrowed to a specific location.
 * Thanks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadding-a-secondary-location-variable%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [aazztech](https://wordpress.org/support/users/aazztech/)
 * (@aazztech)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/adding-a-secondary-location-variable/#post-11890430)
 * Hi,
    We don’t have the feature to search for two location type separately but
   it is possible to do that in other way. First you have to set state and city 
   names with parent-child relationship in “Directory Locations”.
 * All the location that are set according to parent-child relationship will be 
   shown as same hierarchy as their relationship in Location dropdown option in 
   Search and Filter. From this Location field user can select state or city to 
   search to a specific location.

Viewing 1 replies (of 1 total)

The topic ‘Adding a secondary location variable’ is closed to new replies.

 * ![](https://ps.w.org/directorist/assets/icon-256x256.gif?rev=3185058)
 * [Directorist: AI-Powered Business Directory, Listings & Classified Ads](https://wordpress.org/plugins/directorist/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/directorist/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/directorist/)
 * [Active Topics](https://wordpress.org/support/plugin/directorist/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/directorist/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/directorist/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [aazztech](https://wordpress.org/support/users/aazztech/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/adding-a-secondary-location-variable/#post-11890430)
 * Status: resolved