I know this has been asked before – but I’m still puzzled since it seems that some prople managed to get this working while others not.
As the title suggests I need to run a query filtered by conditions set in checkboxes. I now have a unique checkbox for this CPT and I also switched to the true/false checkbox – but nothing helps. My query looks like this:
$plays = get_posts(array(
'post_type' => 'performance',
'meta_key' => 'the_date',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'posts_per_page' => -1,
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'the_date',
'compare' => '>=',
'value' => $today,
),
array(
'relation' => 'OR',
array(
'key' => 'hide_performance',
'value' => '1',
'compare' => 'NOT EXISTS',
),
array(
'key' => 'hide_performance',
'value' => '1',
'compare' => '!=',
),
),
),
));
the strange thing is, I don’t seem to get anything from the checkbox – even if I just want to output the value like
echo ( get_field('auffuhrung_verstecken') );
or like this:
print_r ( get_field('auffuhrung_verstecken') );
I have both the latest installations for WP (4.9.1) and ACF (5.6.7)
thank you very much
kind regards
t