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.

Here's the scenario:

A user clicks on a tag which takes them to a list of all those posts with that tag. There are hundreds of posts, so the user needs a way to filter these.

Here's the question:

How would you build a drop down that a user can select to filter by category while on the tag page. Filter all Yellow tags by Color category for instance.

Also the reverse would be useful. Searching the Color category and filtering by the tag Yellow.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

The function get_posts() allows you to set parameters for both categories and tags. You could build two drop down boxes that list all categories or tags and then use JavaScript or just make a new page to sort these.

What other information do you need?

share|improve this answer
    
An example would be useful. –  toscho May 5 '12 at 2:24
    
This is definitely sending me in the right direction. Will get_posts take a category selected filter down by tag? This would essentially be two levels of search. One first for a category, then another after for tag (or maybe multiple tags). –  Travis Clark May 11 '12 at 16:03

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.