Sorting by tag or category

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.

1 Answer
1

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?

Leave a Comment