Exclude posts with certain post formats in query_posts
-
I’ve been banging my head against the keyboard trying to figure this out. Does anyone know how to exclude a given post format in query_posts?
For example, I don’t want asides to appear on the front page.
Up until now I’ve used this query to pull posts:
<?php // this is where the Features module begins query_posts( array( 'post__not_in' => $ids, 'showposts' => 10 ) ); ?> <?php while (have_posts()) : the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="https://www.thegate.ca/wp-content/themes/mimbo2.2/timthumb.php?src=<?php getImage('1'); ?>&w=75&h=75&zc=1&q=100" class="alignleft" alt="<?php the_title(); ?>"></a><a href="<?php the_permalink() ?>" rel="bookmark" class="title"> <?php the_title(); ?> »</a> <?php the_excerpt(); ?><BR> <?php endwhile; ?>
In the line “query_posts( array( ‘post__not_in’ => $ids, ‘showposts’ => 10 ) )” I have tried using ‘has_post_format’ => ‘standard’, format, $format, and a bunch of other things, but nothing seems to work.
Can anyone help me with this?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Exclude posts with certain post formats in query_posts’ is closed to new replies.