Thanks to Otto‘s excellent post on advanced taxonomy queries, I (mostly) understand how to create multi-taxonomy and multi-term queries. However, what I don’t know is how to build those dynamically based on user input. I’d really like to end up with something like Amazon.com has on their site, with check boxes next to the various terms for a taxonomy in the sidebar (and multiple lists of terms, each with a taxonomy heading). Something like this:
How should I go about building something like this? Displaying the content dynamically (content changes when a box is checked) would be great, but I’d certainly settle for having a “submit” button.
I am a little fuzzy on specifics of technical side, but I think general outline would be following:
Interface – you will need to either submit this as form by button or JavaScript.
Query variables – you will need to register custom variable(s) via
query_vars
filter so your custom data is not discarded from URL.submit the form with javascript when a box status is changed. Then you can use wp_query to create a new query and use tax_query to display taxonomies that is checked:
hope it helps.