I need help with what seems to be a simple matter, but I have not been able to figure it out.
I have a restaurant review site with pages for each restaurant that have both a "city" and a "state" custom taxonomy. I want to set up an index page that lists all restaurants with the hierarchy State > City > Restaurant (post). I have set up 3 views: (1) a posts view for the restaurants, (2) a taxonomy view for cities, and (3) a taxonomy view for states. Each works except the the States view. I have not been able to figure out how to set up the filters so that only the restaurants in each state appear under that state. As it is, I get all of the cites & restaurants under each state.
I've attached a screenshot showing the output I get from each of the 3 views that I have set up. Any help would be appreciated.
Thanks for your response. In originally setting up my nested views, I went over the article you mentioned many times, but I am still not getting the desired results. I am missing something, but can't figure out what it is.
Like in Drupal, you probably are looking for a "Group by" feature that allows for filtering at various levels. This does the heavy lifting and gets rid of repetition of headings, etc. Otherwise, in WordPress Views you need to nest and filter and it gets very difficult to manage, very quickly.
I was told that "Group by" was coming, but like all software dev, I only believe it once I see AND try it. Hopefully, Views will support this much needed feature soon, and make it elegant and simple to use. Until then, I'm stuck in Drupal Views 3 land for controlled "grouped-by" listings that are dead simple to set up.
Not much help, I know, but perhaps my post will motivate the dev's to push this feature out the door sooner rather than later.
I have been playing around with the setup but there is something that I am missing. How to find out which cities belong to which states? There is no way of setting such a relationship between two taxonomy terms.
So I have been thinking on an alternative solution, the idea is to use 2 views: a states view and a restaurants view. The restaurants view will list restaurants that belong to a state, and it would show the city.
If you use a single hierarchical taxonomy called for example “Locations?? then it might be easier to do what you need.
Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.
The approach you suggest is actually one that I tried early on. There was something about it that was not exactly ideal for my purposes, but I can't remember now what that was. Let me go back and set that up again and do some testing, and I'll get back to you.