tax_query range?
-
I’m working on a product search, I have a taxonomy for width and I need to be able to get products that fall within a range. So for example I have a product that is 4.25 inches wide. I want to be able to find all products that have a width between 1 inch and 6 inches… this code is not working though.
$query_args['tax_query'][] = array( 'taxonomy' => 'pa_width-in', 'terms' => array(1, 6), 'field' => 'slug', 'operator' => 'IN' );Is there a way to do this, or do I need an array with the exact width values between 1 and 6 that exist in the database? And if so, how would I get that?
-
I’m sorry, but you appear to be in the wrong forum.
This forum is for issues related to WordPress.COM sites. Your question is related to a self-hosted WordPress(.org) site, for which you can find the forum here: http://wordpress.org/support
More on the differences between WordPress.com and WordPress.org: http://en.support.wordpress.com/com-vs-org/
-
I think you might be in the wrong forum. This is the WordPress.com support forum–sites hosted here don’t have any access to the backend or code of our sites. If you go over to the WordPress.org forum, they should be able to help: http://wordpress.org/support/
-
-
- The topic ‘tax_query range?’ is closed to new replies.