Can't seem to find out what I'm doing wrong.
$args = array( 'post_type' => 'wr_event', // my custom post type 'posts_per_page' => -1, // show all posts 'meta_query' => array( array( 'key' => 'event_announced', // a custom field either "on" or "off" 'value' => 'on', 'compare' => 'NOT IN' ) ) ); $loop = new WP_Query( $args );
So all I want to do is loop through all
wr_events but if an event has the custom field
event_announced (a checkbox) checked I'd like to exclude it.
Ideas? I tried setting "on" or "off" for the
value and tried different solutions for