我想订购一些ACF字段从WP_Query返回的帖子:
我们要实现的排序是:
到目前为止,我们没有做过任何尝试:
$args = array(
"post_type" => "panden",
"post_status" => "publish",
"posts_per_page" => -1,
'meta_query' => array(
'relation' => 'AND',
'datum_online_clause' => array(
'key' => 'datum_online_gezet',
'value' => 'EXISTS',
),
'status_clause' => array(
'key' => 'status',
'compare' => 'EXISTS',
),
),
'orderby' => array(
'datum_online_clause' => 'DESC',
'status_clause' => 'DESC',
),
);
如何确定状态并更改WP_Query以使其正常工作?