呜呜,我为什么要为此悬赏;-)答案很简单-在元查询中添加“type”=>“numeric”。
array(5) {
["posts_per_page"]=>
int(6)
["orderby"]=>
array(2) {
["uss_product_price"]=>
string(4) "DESC"
["uss_product_weight"]=>
string(4) "DESC"
}
["meta_query"]=>
array(3) {
["relation"]=>
string(3) "AND"
["sortprimary_clause"]=>
array(3) {
["key"]=>
string(17) "uss_product_price"
["compare"]=>
string(6) "EXISTS"
["type"]=>
string(7) "numeric"
}
["sortsecondary_clause"]=>
array(2) {
["key"]=>
string(18) "uss_product_weight"
["compare"]=>
string(6) "EXISTS"
}
}
["paged"]=>
string(1) "1"
["post_type"]=>
string(7) "product"
}