mimicking post_type logic of wp_query for boolean query