I have searched high and low for an answer to this query (pun intended).
I am trying to query all posts where the repeater field has sub fields with a value (i.e. not empty). This is currently pulling through all posts in the post_type 'sites' with the correct order, but the meta_query is having no effect.
<?php
$args = array(
'post_type' => 'sites',
'orderby' => 'meta_value_num',
'posts_per_page' => 5,
'meta_query' => array(
array(
'key' => 'bonuses',
'compare' => '!='
)
)
);
query_posts($args);
while (have_posts()):
the_post(); ?>
meta_query
I believe you have to use the'value'
to compare with. – CaldwellYSR