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.

Okay i'm having a bit of a catogorisation/taxonomy/filtering problem here and am at loss on how to solve this. I hope someone could help me on the way a bit.

Say I've got a blog about food, with a few main subjects;

  • thai food
  • indian food
  • greek food
  • mexican food
  • french food
  • spanish food
  • fast food

A blogpost is always tied to one or multiple of these subjects (a blogpost about a fajita is just filed under 'mexican food', a blogpost on 'burrito' under both 'mexican food' and 'fast food').

Then there are different categories like

  • restaurants
  • reviews
  • information
  • news
  • take-out
  • recipies

Blogposts are also always tied to one or multiple of these categories. These categories are available through the menu.

What I want to do is, offer the visitor a possibility to filter all the content on a specific subject. If one would chose to put the filter on 'thai food', all the articles returned should be about thai food. If one would chose the category reviews while the filter 'thai food' is on, it should only list articles about thai food within the category reviews.

If the filter is set to off (or all) and one would navigate to the category 'reviews', articles in the category review on all different subjects should be retreived.

So there it is! Now I realize I might have explained this in a difficult way, but I'm a loss on how to achieve this here.

Right now I've got both the subjects as the categories as top level categories but I'm assuming a custom taxonomie might be a better solution. Any help would be greatly appreciated!

edit: okay to make things easier, I think I have a better idea of what should be happening here: I should detect wether the user has a filter selected (which are custom taxonomies right now) and return posts accordingly. (so something like: if thai food is selected and user clicks on category 'reviews', return a query with custom taxonomie thai food in category reviews) My main question in this case is, how do you detect if there is a taxonomie selected, and which? Thanks!

share|improve this question
add comment

1 Answer

I think you're on the right path with splitting some of your categories out to separate taxonomies.

Have a look at the Query Multiple Taxonomies plugin that will give visitors a widget interface for filtering posts:

Query Multiple Taxonomies Widget

share|improve this answer
    
Thanks for your quick reaction! The widget can be a nice addition, I think the only problem is, that I want users to be able to navigate through the main navigation, and clicking one of the menu items retrieves a whole category. So when a visitor has the filter on thai food and navigates to 'reviews' something like this should happen 'if custom taxonomy is thai food, retrieve posts in selected category (reviews in this example) which have the custom taxonomy thai food'. Or something like that..am I thinking in the right direction here? –  Nedra012 Aug 21 '11 at 11:51
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.