Title: Get only recent Thumbnail-Posts
Last modified: August 20, 2016

---

# Get only recent Thumbnail-Posts

 *  [racerfreak85](https://wordpress.org/support/users/racerfreak85/)
 * (@racerfreak85)
 * [14 years ago](https://wordpress.org/support/topic/get-recent-thumbnail-posts/)
 * hi,
 * i try to get the recent post ONLY WITH a post-thumbnail. that means if there 
   is a post with no thumbnail the last post WITH a thumbnail should be displayed.
 * this is my code so far to display the last post (in a sidebar) from a custom 
   post type / taxonomy:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   The maximum number of lines of code that you can post in these forums is **ten
   lines**. Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * this works fine. but now when i add a new post without a thumbnail nothing is
   displayed anymore of course…
 * so how can i display the last post with a post-thumb attached?
 * thanks sooo much in advance for help 🙂

The topic ‘Get only recent Thumbnail-Posts’ is closed to new replies.

## Tags

 * [post](https://wordpress.org/support/topic-tag/post/)
 * [recent](https://wordpress.org/support/topic-tag/recent/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [racerfreak85](https://wordpress.org/support/users/racerfreak85/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/get-recent-thumbnail-posts/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
