This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Additional field in “Build posts query” question

9 years ago · Last reply by micemade 8 years ago

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.

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

2
  1. Alex S Staff 8 years, 11 months ago

    Hi Micemade

    Unfortunately, the additional field doesn’t currently support arrays. I’m going log this as a feature request. Sorry mate. :()

  2. micemade 8 years, 11 months ago

    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

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread