Title: Exclude posts with featured image from loop
Last modified: August 20, 2016

---

# Exclude posts with featured image from loop

 *  [oneeyedpauly](https://wordpress.org/support/users/oneeyedpauly/)
 * (@oneeyedpauly)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/exclude-posts-with-featured-image-from-loop/)
 * This may seem an odd request but I’m looking for a way to display a list of posts
   excluding any that have a featured image.
 * I have a row of four posts which include the most recent four posts with a featured
   image. I would then like to display all the other posts that DO NOT have a featured
   image as links underneath.
 * This is what I’ve come u with so far:
 *     ```
       <div class="row">
       	<?php
       	global $post;
       	$args = array( 'numberposts' => 4, 'category' => 10,'meta_key'=>'_thumbnail_id', );
       	$myposts = get_posts( $args );
       	foreach( $myposts as $post ) :	setup_postdata($post); ?>
       		<li class="span2">
       		<a href="<?php the_permalink() ?>">
       			<div class="featured-blog">
       			<?php the_post_thumbnail( 'post' ); ?>
       			<h3><?php the_title(); ?></h3>
       			<p><?php the_time('d/m/y:') ?> - <?php the_excerpt(); ?></p>
       			</div>
       		</a>
       		</li>
       	<?php endforeach; ?>
       </div>
   
       <div class="row">
       	<div class="span2">
       	<h3>Other News</h3>
       	</div>
   
       	<div class="span3">
       	<?php
       	global $post;
       	$args = array( 'numberposts' => 4, 'category' => 10 );
       	$myposts = get_posts( $args );
       	foreach( $myposts as $post ) :	setup_postdata($post); ?>
       	<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
       	<?php endforeach; ?>
       	</div>
   
       	<div class="span3">
       	<?php
       	global $post;
       	$args = array( 'numberposts' => 4, 'offset' => 4, 'category' => 10 );
       	$myposts = get_posts( $args );
       	foreach( $myposts as $post ) :	setup_postdata($post); ?>
       		<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
       	<?php endforeach; ?>
       	</div>
       </div>
       ```
   

The topic ‘Exclude posts with featured image from loop’ is closed to new replies.

## Tags

 * [exclude](https://wordpress.org/support/topic-tag/exclude/)
 * [featured](https://wordpress.org/support/topic-tag/featured/)
 * [image](https://wordpress.org/support/topic-tag/image/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * 0 replies
 * 1 participant
 * Last reply from: [oneeyedpauly](https://wordpress.org/support/users/oneeyedpauly/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/exclude-posts-with-featured-image-from-loop/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
