Support

Account

Home Forums General Issues Meta query if checkbox false? Reply To: Meta query if checkbox false?

  • 
    // for set to false of no value
    $args = array(
            'numberposts' => -1,
            'post_type' => 'team',
            'meta_query' => array(
              'relation' => 'OR',
              array(
                'key'   => 'is_manager',
                'value' =>  0,
                'compare' => '='
              ),
              array(
                'key'   => 'is_manager',
                'compare' => 'NOT EXISTS'
              )
            )
          );