# Custom taxonomies to define versions of a product

I have a custom post type that describes components of a product. As the product is developed new components are added. I'd like to define what version of the product the component was added, and then be able to browse products by that version.

I tried making a custom taxonomy as the version, but my problem is when I browse that version. I only see the components added for that version. I need to include all components for that version and previous versions.

Is taxonomies that right approach or is there another way to handle this in WP?

-

Taxonomies is not the right approach here, you should use custom fields (post meta) instead this way you can use compare argument of the meta query as <= ex:
$args = array( 'post_type' => 'product', 'meta_query' => array( array( 'key' => '_version', 'value' => '1.0', 'compare' => '<=' ) ) );$query = new WP_Query( \$args );