mercredi 4 mars 2015

Return multiple comment_meta keys


I've this code



$args = array(
'post_id' => $post_id,
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'review_title'
),
array(
'key' => 'review_rating',
)
),
);

$comments_query = new WP_Comment_Query;
$comments_array = $comments_query->query( $args );


It works fine, will work only if review_title AND review_rating exists. But it return only the second key, and I need to return both





Aucun commentaire:

Enregistrer un commentaire