Vote count:
0
In Wordpress User Query, I want to customize the meta key like this:
$now = date('m-d', time());
$args = array(
'meta_query' => array(
0 => array(
'key' => 'cb_geboortedatum',
'value' => '1901-01-01',
'compare' => '!='
),
1 => array(
'key' => "RIGHT(cb_geboortedatum, 5)",
'value' => $now,
'compare' => '!='
),
),
);
// The Query
$user_query = new WP_User_Query( $args );
return $user_query->results;
Look at the meta key number 1: key => RIGHT(cb_geboortedatum, 5)
But the result return empty, maybe we can not use 'RIGHT(cb_geboortedatum, 5)'
Anybody help me to do this. Will very happy, thanks! Tin
asked 45 secs ago
Wordpress - How to customize meta key when using user query
Aucun commentaire:
Enregistrer un commentaire