Title: Sorting not working correctly
Last modified: July 12, 2017

---

# Sorting not working correctly

 *  [RGVBaptist](https://wordpress.org/support/users/rgvbaptist/)
 * (@rgvbaptist)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/sorting-not-working-correctly-2/)
 * I have several events. All of them are sorting correctly (ASC) except for two.
 * Event A starts and ends on July 27th
    Event B starts on July 24th and ends on
   July 28th
 * When I sort, event A comes before event B even though B starts first. All of 
   the other entries are in their correct order.
 * You can see this live here:
    [http://starrtoday.com/events](http://starrtoday.com/events)

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

 *  Plugin Author [Guido](https://wordpress.org/support/users/guido07111975/)
 * (@guido07111975)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/sorting-not-working-correctly-2/#post-9312531)
 * Hi,
 * My plugin does sorting on end-date only. And if end-date of both events is the
   same, it sorts events by post ID… so I think that’s the issue here as well. Can
   you check this?
 * Guido
 *  Thread Starter [RGVBaptist](https://wordpress.org/support/users/rgvbaptist/)
 * (@rgvbaptist)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/sorting-not-working-correctly-2/#post-9312565)
 * I was afraid you were going to say that. :/ The end date of the second event 
   is indeed after the first event. That said, sorting by end date makes no sense,
   really.
 * Event 1: 7/27
    Event 2: 7/24 through 7/28
 * Event 2 clearly starts before event 1 but shows up second because it ends after
   it. This could easily be overlooked by someone who is just quickly scanning for
   an event on the current day, or in the next couple of days, if the end date on
   that event is a few days away. I’d love to see the option to have it sort by 
   start date, as that seems to make much more sense to me.
 *  Plugin Author [Guido](https://wordpress.org/support/users/guido07111975/)
 * (@guido07111975)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/sorting-not-working-correctly-2/#post-9313336)
 * Hi,
 * You’re right but to make this happen I must do some serious coding. Not easy.
   I’ve developed this plugin a few years ago containing 1 date only. So afterwards
   I did change this into a double-date plugin. That’s why sorting is on 1 date.
   And sorting is on end-date because that variable determines until when the event
   should stay listed. Please don’t forget this is a very simple plugin, so limited
   options.
 * Guido
 *  Thread Starter [RGVBaptist](https://wordpress.org/support/users/rgvbaptist/)
 * (@rgvbaptist)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/sorting-not-working-correctly-2/#post-9317072)
 * No, I definitely understand. Simple is what I wanted. Was just hoping the sort
   would be more intuitive. I definitely understand the whole “spaghetti code” issue.
   Things happen. Oh well, maybe in the future…
 *  Plugin Author [Guido](https://wordpress.org/support/users/guido07111975/)
 * (@guido07111975)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/sorting-not-working-correctly-2/#post-9317224)
 * Hi,
 * I hope so. You’re not the first user with this comment, so when I have some spare
   time I will try to find a solution. Meanwhile I hope you will continue to use
   my plugin on your website.
 * Guido
 *  Plugin Author [Guido](https://wordpress.org/support/users/guido07111975/)
 * (@guido07111975)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/sorting-not-working-correctly-2/#post-9463185)
 * Hi again,
 * I might have found a fix for the event order, check my latest response [here](https://wordpress.org/support/topic/order-events-by-start-date/).
 * Guido

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

The topic ‘Sorting not working correctly’ is closed to new replies.

 * ![](https://ps.w.org/very-simple-event-list/assets/icon-256x256.png?rev=1415754)
 * [VS Event List](https://wordpress.org/plugins/very-simple-event-list/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/very-simple-event-list/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/very-simple-event-list/)
 * [Active Topics](https://wordpress.org/support/plugin/very-simple-event-list/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/very-simple-event-list/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/very-simple-event-list/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Guido](https://wordpress.org/support/users/guido07111975/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/sorting-not-working-correctly-2/#post-9463185)
 * Status: not resolved