Reverse Order of WordPress – Show by Descending Date

So, recently, I was utilizing WordPress’ comments engine on a page to display feedback for a client’s e-book. After implementing, the client requested that the comments display from newest to oldest, which is the reverse of the default order of WordPress comments.

I found a great post at WPMU.org, and quickly simplified it to this:

It’s one line of code, and instead of declaring another function (which is fine), I opted for just calling PHP’s array_reverse().

Hope this helps you out. Happy coding ;]

4 Comments

  1. Byron says…

    Smart client.

    Nice work. Super efficient, as always.

  2. Scion Players | Show WordPress Comments in Reverse Order says…

    [...] Read the article: Show WordPress Comments in Reverse Order [...]

  3. Jon Berry says…

    Excellent!! So quick and easy.

  4. Daniel says…

    Thank you very much! I’ve been looking for this for a very long time :)

RSS feed for comments on this post. TrackBack URL

Leave a Comment

January 30, 2013

Filed in Wordpress

There are 4 comments »


« Back to the Blog