Title: Exclude current post from query_posts?
Last modified: August 18, 2016

---

# Exclude current post from query_posts?

 *  [delaque](https://wordpress.org/support/users/delaque/)
 * (@delaque)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/exclude-current-post-from-query_posts/)
 * I would like to display a bunch of links in the same categories as the current
   post in my sidebar. However, I would like to exclude the current post from that
   listing. I could do it by getting one post extra, and then check each post for
   the current post ID, but I’d rather modify the query_posts query to not include
   the current post ID. Is this possible?

The topic ‘Exclude current post from query_posts?’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [delaque](https://wordpress.org/support/users/delaque/)
 * Last activity: [20 years, 3 months ago](https://wordpress.org/support/topic/exclude-current-post-from-query_posts/)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
