Is it possible to use not custom fields in get_posts()
's 'meta_query'
to use a or
-relation statement with a custom field and a category id?
Like this:
$args = array(
'posts_per_page' => 6
, 'offset' => 0
, 'meta_query' => array(
'relation' => 'OR'
, array(
'key' => 'placing'
, 'value' => 'nn'
)
, array(
'key' => 'category_id'
, 'value' => $cat->term_id
)
)
);
$myposts = get_posts($args);
And if so, should it be term_id
or category_id
?
Or how do I accomplish that?