I am working on a site that will be listing a few hundred products and we wanted to be able to quickly/easily show specific products on a page based on taxonomies. I have been doing some research and thought I was on the right track.
First, I found this article on digwp.com which I thought was going to work great. I can not get it to pull the posts based on taxonomy though – just post_type. The Post Type is “Used Items” and I created a taxonomy named Color where one of the slugs was Red.
[loop the_query="post_type=used-items&color=red&ord=ASC"]
I also found this plugin for doing a query by shortcode, but same situation with it not pulling by taxonomy.
My question
Does anyone know what I can do to pull posts based on post type/taxonomies (would be using multiple each query) directly from a WordPress page. We want to be able to quickly query products without having to program the query into a page template for each possible option.
here is a simple shortcode that can handle taxonomies, post types and any other parameter that WP_Query takes:
usage:
replace page with your post type name, taxonomy_name with your taxonomy name and taxonomy_term with the taxonomy term