Hello,
I've created a product_category called 'featured'
I'm now trying to write and submit a WP_Query that will give me all data including regular_price, sale_price_amount metadata for all published products with the ability to limit by category (in this case 'featured') but there will be others in the future.
Can someone provide a code snippet for this ?
My code shown below is returning all products and data as desired, however it is ignoring the filter on category=featured so gives all products
$filter_query['taxonomy']='product_category';
$filter_query['field']='slug';
$filter_query['terms']='featured';
$args = array(
'post_type' => 'product',
'post_status' => 'publish',
'showposts' => -1,
'tax_query' => $filter_query,
'order_by' => 'date',
'order' => 'ASC'
);
$sqlResultsObj = new WP_Query( $args );
What sayeth the group?
Jay
CompuMatter