I am writing a plugin which creates a custom post type and two associated custom taxonomies. The custom post type list/archive page should be filterable by terms in one or both taxonomies i.e not just a filter by one taxonomy term. The filters should be displayed as two separate tag clouds.
Does anyone have experience of implementing this functionality and can recommend any suitable plugins?
You don’t really need a pre-built plugin for this or you may create your own slim plugin. This is how I’d tackle the problem:
<select>
boxes as the taxonomies you want to filter.<option>
value
s will be equal to the term’s slugs.wp_tag_cloud
and hook it to the hidden<select>
filters using JavaScript.<select>
box filter and submit the form.$_GET
and query and filter the posts usingnew WP_Query
.Following is an example implementation. You can list as many taxonomies you want. Make sure you have jQuery loaded before trying to use it: