Title: Reverse Post Order Using Custom Widget
Last modified: August 30, 2016

---

# Reverse Post Order Using Custom Widget

 *  [darkflux](https://wordpress.org/support/users/darkflux/)
 * (@darkflux)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/reverse-post-order-using-custom-widget/)
 * So I’m using this code:
    [https://gist.github.com/guillermotron/6586932](https://gist.github.com/guillermotron/6586932)
 * And I can’t seem to figure out how to reverse the post order. I still want to
   have the newest 3 posts listed, but with the oldest of the newest posts first,
   instead of the standard WordPress order where the newest of the newest come first.
 * clear as mud?

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

 *  [John Parris](https://wordpress.org/support/users/mindctrl/)
 * (@mindctrl)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/reverse-post-order-using-custom-widget/#post-6327972)
 * Hi,
 * On [line 132](https://gist.github.com/guillermotron/6586932#file-recent_posts_specific_category_widget-L132)
   there’s a filter for modifying the query. You can pass in a value for the ‘order’(
   [reference](https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters))
   in addition to those others and that should fix it up for you.
 *  Thread Starter [darkflux](https://wordpress.org/support/users/darkflux/)
 * (@darkflux)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/reverse-post-order-using-custom-widget/#post-6327999)
 * yeah, but when i do that, it shows the OLDEST post on the main screen.
 * what i want is the oldest of the 3 NEWEST posts first.
 *  Thread Starter [darkflux](https://wordpress.org/support/users/darkflux/)
 * (@darkflux)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/reverse-post-order-using-custom-widget/#post-6328001)
 * the way WordPress works, it lets you choose how many posts to pull, and what 
   order the list should be when it pulls them, but not what order to DISPLAY them
   afterwards, apparently. unless i’m just missing that string…

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

The topic ‘Reverse Post Order Using Custom Widget’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [darkflux](https://wordpress.org/support/users/darkflux/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/reverse-post-order-using-custom-widget/#post-6328001)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
