Title: sort posts entries by date
Last modified: August 30, 2016

---

# sort posts entries by date

 *  Resolved [cotp](https://wordpress.org/support/users/cotp/)
 * (@cotp)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/sort-posts-entries-by-date/)
 * Hello all
 * I am manually migrating an old guestbook and I have some ids in the database 
   that do not match the date order.
 * Now on the frontend, my posts are in completly random order.
 * I would like to know how I could make posts display from 2015 to 2002 for example(
   in date order)
 * Thanks in advance
 * Cotp
 * [https://wordpress.org/plugins/gwolle-gb/](https://wordpress.org/plugins/gwolle-gb/)

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

 *  Plugin Author [Marcel Pol](https://wordpress.org/support/users/mpol/)
 * (@mpol)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/sort-posts-entries-by-date/#post-6264101)
 * Hi,
    You imported with a CSV? If the CSV has a date it will place them in that
   order. If the CSV has not a timestamp, but a human readable date, it will do 
   its best to make a timestamp of it.
 * Currently there is not yet the option to change the date of each entry in the
   editor. It is often requested, so it should be someday soon :).
 *  Thread Starter [cotp](https://wordpress.org/support/users/cotp/)
 * (@cotp)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/sort-posts-entries-by-date/#post-6264112)
 * Hello Marcel,
 * Thanks for anwsering me
 * No, what I did is manually entered a new message from the frontend and then modified
   the date of each message in PHPMYADMIN. I had to convert each one with a proper
   timestamp (I used an Excel function for that)
 * My first messages are in that order for now:
    22 may 2001 at 2:40am min: 19 march
   2000 at 11:31pm min: 1 november 1999 at 6:57pm min: 1 june 1999 at 8:20am min:
   24 june 2015 at 5:40pm min: 2 april 2015 at 9:08pm min: 6 february 2015 at 6:
   28pm min: 2 july 2014 at 10:59pm min: 28 january 2014 at 11:43am min:
 * By default the order should be by date or by post id ?
 * What do you think causes the problem if it should be by date order ?
 * Cotp
 *  Plugin Author [Marcel Pol](https://wordpress.org/support/users/mpol/)
 * (@mpol)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/sort-posts-entries-by-date/#post-6264113)
 * Ah, then probably the date fields for the first ones need a zero before it. They
   have one number less, since about 2003.
 *  Thread Starter [cotp](https://wordpress.org/support/users/cotp/)
 * (@cotp)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/sort-posts-entries-by-date/#post-6264115)
 * Thanks very much Marcel this solved the problem !
 *  Plugin Author [Marcel Pol](https://wordpress.org/support/users/mpol/)
 * (@mpol)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/sort-posts-entries-by-date/#post-6264120)
 * I suspect there’s a bug here. The field in the database is a varchar, so that’s
   where the sorting goes wrong. It needs to be TIMESTAMP or something similar.

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

The topic ‘sort posts entries by date’ is closed to new replies.

 * ![](https://ps.w.org/gwolle-gb/assets/icon-256x256.png?rev=1114688)
 * [Gwolle Guestbook](https://wordpress.org/plugins/gwolle-gb/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gwolle-gb/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gwolle-gb/)
 * [Active Topics](https://wordpress.org/support/plugin/gwolle-gb/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gwolle-gb/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gwolle-gb/reviews/)

## Tags

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

 * 5 replies
 * 2 participants
 * Last reply from: [Marcel Pol](https://wordpress.org/support/users/mpol/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/sort-posts-entries-by-date/#post-6264120)
 * Status: resolved