Help altering a query to exclude all but standard post format

Okay, I found the answer after some more hunting. Apparently the only way to pull the standard posts is to add:

'operator' => 'NOT IN',

So it looks for posts that aren’t in the image post format. Or I have to add an array of terms to the terms line so it won’t return any of those formats. Odd, but it works.

<?php 
$args = array(
  'post__not_in' => $ids, 
  'showposts' => 10, 
  'cat' => '-4,-1866,-27',
  'tax_query' => array(
    array(
      'taxonomy' => 'post_format',
      'field' => 'slug',
      'terms' => 'post-format-image',
      'operator' => 'NOT IN'
    )
  )
);  
    query_posts( $args ); ?>
<!-- The Loop -->
    <?php endwhile; ?>

Leave a Comment