meta query
https://developer.wordpress.org/reference/classes/wp_meta_query/
$pattern = "";
'meta_query' => array(
array(
'key' => 'birthday',
'value' => $pattern,
'compare' => 'REGEXP'
),
'popularity_clause' => array(
'key' => 'subscription_count',
'compare' => 'EXISTS',
'type' => 'NUMERIC'
)
),
'orderby' => array(
'popularity_clause' => 'DESC',
'title' => 'ASC'
)
'meta_query' => array(
array(
'key' => 'key-1',
'value' => $value,
'compare' => '='
),
'x_clause' => array(
'key' => 'key-2',
'compare' => 'EXISTS'
)
),
'meta_type' => 'NUMERIC', // global meta type for key-1 and key-2
'orderby' => array(
'day_clause' => 'ASC',
'title' => 'ASC'
)
Comments
Post a Comment