Title: exclude posts from certain years
Last modified: August 19, 2016

---

# exclude posts from certain years

 *  [rosebean](https://wordpress.org/support/users/rosebean/)
 * (@rosebean)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/exclude-posts-from-certain-years/)
 * I`m wondering if anyone knows of a way to exclude posts from certain years? For
   example, I want to hide all of my 2008 posts but I don’t want to delete them 
   and I don’t want to have to manually un-publish each post that was posted in 
   2008.

Viewing 1 replies (of 1 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/exclude-posts-from-certain-years/#post-978886)
 * Hide them from where?
 * As an example, with the WordPress Default theme, to wp-content/themes/default/
   index.php you could use the [template tag](http://codex.wordpress.org/Template_Tags),
   [query_posts()](http://codex.wordpress.org/Template_Tags/query_posts), just before
   [The Loop](http://codex.wordpress.org/The_Loop) to display only 2009 posts.
 *     ```
       query_posts($query_string . '&year=2009');
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘exclude posts from certain years’ is closed to new replies.

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/exclude-posts-from-certain-years/#post-978886)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
