“NOT ONLY IN” taxonomy query operator?

There is no simple way to do this via WP_Query(). Depending how many categories you have, the following may not be a good idea. If you have ~20 you may be ok. So, instead of saying “all posts excluding ones in 37”, you would do “get me everything in all terms (not specifying term_id 37”).

To do this you need to use a category__in for all your other categories:

// Get all the category IDs (except 37)
$categories = get_terms( 'category', array( 'exclude' => array( 37 ), 'fields' => 'ids' ) );

query_posts( array( 'category__in' => $categories ) );

This will get you all posts that are in a category other than/aswel as 37. However, doing this on a large amount of categories will start to slow the query down (I am thinking +40,000 posts for example).

error code: 523