In wordpress, I want to query ONLY all posts that has
"
" with value
OR
.
It should only show the 5 latestest and be sortet by
which is the value of the meta_key
.
I can't see whats wrong here below. It dosen't work
Code:
mata_key
Code:
forside_storrelse
Code:
300 x 339 px (artikel)
Code:
615 x 600 px (featured artikel)
It should only show the 5 latestest and be sortet by
Code:
mata_value_num
Code:
wpb_post_views_count
I can't see whats wrong here below. It dosen't work
Code:
array(
'posts_per_page' => 5,
'meta_key' => 'wpb_post_views_count',
'orderby' => 'meta_value_num',
'order' => 'DESC',
'meta_query' => array(
'relation' => 'OR',
array(
'meta_key' => 'forside_storrelse',
'meta_value' => '300 x 339 px (artikel)',
'meta_compare' => 'LIKE'
),
array(
'meta_key' => 'forside_storrelse',
'meta_value' => '615 x 600 px (featured artikel)',
'meta_compare' => 'LIKE'
)
)
)