Passer la navigation

[Résolu] Sort view results closest to today

This support ticket is created Il y a 4 years, 10 months. 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 -

Fuseau horaire du supporter : America/Jamaica (GMT-05:00)

Marqué : 

Ce sujet contient 5 réponses, a 2 voix.

Dernière mise à jour par jelle-jacobd Il y a 4 years, 10 months.

Assisté par: Shane.

Auteur
Publications
#1825357

Tell us what you are trying to do?

I would like to sort the results from the view on date with the closest one to today on top (like z to a).

Is this possible?

Thanks!

#1826111

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Screenshot 2020-10-27 at 9.40.55 AM.png

Hi Jelle,

Thank you for getting in touch.

Perhaps what you can do is to try adding a filter similar to the one in my screenshot.

This should produce the desired results as it uses a between filter to filter for posts with today's date and posts from 2 days ago.

Additionally you can use our Date filters documentation as reference material for further assistance.
https://toolset.com/documentation/user-guides/views/date-filters/

Thanks,
Shane

#1827251

Hi Shane,

That should work. I'll give it a try and get back to you if necessary.

Thanks, Jelle

#1827655

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Jelle,

Thank you.

If there are any issues please let me know. Otherwise you can mark this ticket as resolved when ready.

Thanks,
Shane

#1828409

Hi Shane,

I will, thanks!

Br, Jelle

#1828411

My issue is resolved now. Thank you!