Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need some advise on how to create achieve a representation of streets hierarchy (in this order: Continent > Country > State > City > Street Name)

Like this:

enter image description here

My only guess for now is to do it using custom taxonomies, that are set to be hierarchical. But, I am not too sure about that, and I believe there might be a better approach.

Obviously the street level will be a custom post type.

I'd appreciate your help,

Maor

share|improve this question
1  
Maybe if you do extra Custom Post Types (one extra, hierarchical OR several CPTs individually, one for each type) you can link it with Posts 2 Posts (wordpress.org/extend/plugins/posts-to-posts) –  Álex Acuña Viera Nov 21 '11 at 14:31
add comment

1 Answer

Even though this question is several months old, and you've probably committed to a route by now, I think this one deserves an answer for those who come across it down the road.

It's hard to make any good suggestions without information on what you're going to do with the data or how you need to handle/query it. Probably the most important thing you should ask yourself is: once this is all mapped, what do you want to be able to do with this data? Do you want to be able to see all streets in the USA or have an RSS feed of all streets in SF? Is this just for breaking down permalinks?

As I see it, here are your best options:

  1. Hierarchical custom taxonomy for region, with a CPT for street
  2. CPT for region and CPT for street, and connect them with Posts 2 Posts, as @Álex pointed out
  3. Custom MySQL table, with custom code backing it up

Without further info, one really can't suggest one over another, but I'd say in 90% of the time you'd be best off going with #1, 7% of the time #2, and 3% of the time #3. Don't hold me to the accuracy of that breakdown, though ;-)

I hope this helps you or someone else. If you did move forward on this project, it would be great to share what you ended up doing and how it's working out for you!

Cheers~

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.