Title: Get Posts For Current Year Only
Last modified: August 19, 2016

---

# Get Posts For Current Year Only

 *  Resolved [thisisedie](https://wordpress.org/support/users/thisisedie/)
 * (@thisisedie)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/get-posts-1/)
 * I’d like to do what is described [in this article](http://wpguy.com/articles/an-archives-page-with-all-the-posts-in-cronological-order/)
   only I want it to show ONLY the current years posts. I’ve tried everything I 
   can think of and searched everywhere to no avail. I’d also like to forgo the 
   ul’s and li’s. Anyone have any idea how to make this happen? Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/get-posts-1/#post-921945)
 * oh wait.
 * You know I did this, and it was as hard as editing a plugin’s query. Im trying
   to remember what the plugin was.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/get-posts-1/#post-921946)
 * ok, one of these gets posts before a date, based on the beginning of a year. 
   One get posts before.
 * I have no doubt that you can figure this out. Im just digging it out of my archived“
   stuff”
 * there are 2 functions: wtf() and wtf1() .. they dont take any variables. That
   code is old so you will want to edit the year bits, obviously.
 * [http://pastebin.com/m4f487457](http://pastebin.com/m4f487457)
 *  Thread Starter [thisisedie](https://wordpress.org/support/users/thisisedie/)
 * (@thisisedie)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/get-posts-1/#post-921947)
 * Awesome. Thanks a bunch Whoo!
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/get-posts-1/#post-921948)
 * oh, and you can see too, that you can remove the list stuff too. just edit what’s
   echo’d. I used this code for quite a while — handy stuff.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Get Posts For Current Year Only’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [whooami](https://wordpress.org/support/users/whooami/)
 * Last activity: [17 years, 5 months ago](https://wordpress.org/support/topic/get-posts-1/#post-921948)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
