Skip Navigation

[Resolved] Sorting posts based on custom date field is incorrect

This thread is resolved. Here is a description of the problem and solution.

Problem:
View not sorting by date correctly.
Solution:

In this user's case they have the Post Order plugin installed. This plugin is known to disrupt the sorting order of our Toolset plugins so it is recommended to keep it disabled.

This support ticket is created 3 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 replies, has 2 voices.

Last updated by kristofG 3 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#2059997

We have a CPT "Webinar" with a custom date-time field "Webinar Date".
hidden link
Our view selects all "past" webinars based on Webinar Datum v2 is a number lower than TODAY() which works, but the order is off
"Order by - Field - Webinar Datum v2 - Descending"
I expect the most recent "past" webinar to be first and then descend to the oldest webinar at the end.
However, the webinars ASCEND in time (feb -> march -> april). Except the second to last is indeed older than the 3rd last and the last one is absolutely the oldest, but that contradicts the sorting of the first 20 webinars.
It absolutely makes no sense.

#2060369

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kristof,

Thank you for getting in touch.

When doing the sort order please ensure that you've set the order for the field to a number. Also if you're not running the latest version of our Toolset plugins I would recommend performing an update as well.

If the issue still persist then please go ahead and disable all the non-toolset plugins as well because any plugin that is affecting the post order in general will affect our View/Blocks ordering.

Should the issue still remain, please provide me with admin access to the site as well as a link to the page. I may need to grab a copy of the site if i'm unable to determine what is wrong from looking at the live site.

Thanks,
Shane

#2063015

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kristof,

I tried to log into the site with the token that you've provided but it doesn't seem to work.

It is saying that im locked out.

Can you check on this for me and let me know when I can access the site.

Thanks,
Shane

#2063031

The link must have become invalid due to the backup restore. I have update the link.

#2063039

I have narrowed the issue down to the Post Order plugin.

#2063043

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kristof,

Usually this is suspected plugin. This plugin usually is the cause of when the sort order isn't sorting correctly.

So I would recommend keeping this plugin disabled as it doesn't scope its Ordering function but rather modify all the wordpress post queries with their custom ordering.

Thanks,
Shane

#2063253

My issue is resolved now. Thank you!