Hi,
I’m trying to build (rather) complex query to output posts (“product” CPT actually), using “additional” query field, but so far wasn’t able to do it. I have this piece of query args array:
"meta_query" => array( "relation" => "AND", array( "key" => "_stock_status", "value"=> "instock", ), array( "key" => "_sale_price", "value" => 0, "compare" => ">=", ), )
to show only “in stock” and sale products. I tried to wrap it in another array(), but no luck …
Any advice on how to do it ?
Big thnx.
Hi Micemade
Unfortunately, the additional field doesn’t currently support arrays. I’m going log this as a feature request. Sorry mate. :()
I was afraid that’s the case …
Yeah, that should be a feature request, perhaps a select field before “Additional” field with options like: “Simple URL query” , “Array of arguments”, or conditional with is_array() in base/inc/post-selector.php siteorigin_widget_post_selector_process_query() func.
Anyhow, thank you for reply.
Best regards,
Alen