Title: Exclude a category from &#8216;the loop&#8217;
Last modified: August 18, 2016

---

# Exclude a category from ‘the loop’

 *  [reinierl](https://wordpress.org/support/users/reinierl/)
 * (@reinierl)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/exclude-a-category-from-the-loop/)
 * How can I implement this idea:
 * I want the lates post from the categorie ‘portfolio’ and I want the latest post
   that is NOT IN the categorie ‘portfolio’.
 * The first one is simple, I simply do this before ‘the loop’:
 * query_posts(‘category_name=portfolio&showposts=1’);
 * But how do I accomplish the second issue? It’s no problem to run 2 loops.

Viewing 1 replies (of 1 total)

 *  [hops](https://wordpress.org/support/users/hops/)
 * (@hops)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/exclude-a-category-from-the-loop/#post-526224)
 * I was wondering the same thing — is there a plugin that does this? I want to 
   keep one category as a lone post always at the top that i might change once every
   few weeks, while the loop runs below….

Viewing 1 replies (of 1 total)

The topic ‘Exclude a category from ‘the loop’’ is closed to new replies.

## Tags

 * [categories](https://wordpress.org/support/topic-tag/categories/)
 * [exlude](https://wordpress.org/support/topic-tag/exlude/)

 * 1 reply
 * 2 participants
 * Last reply from: [hops](https://wordpress.org/support/users/hops/)
 * Last activity: [19 years, 3 months ago](https://wordpress.org/support/topic/exclude-a-category-from-the-loop/#post-526224)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
