📜  排序甚至不存在 meta wordpress - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:23.428000             🧑  作者: Mango

代码示例1
$query->set( 'meta_query', array(
    'relation' => 'OR',
    array(
        'key' => 'custom_meta_key', 
        'compare' => 'EXISTS'
    ),
    array(
        'key' => 'custom_meta_key', 
        'compare' => 'NOT EXISTS'
    )
) );
$query->set( 'orderby', 'meta_value title' );