Skip Navigation

[Resuelto] Views: Limit posts to last 2 years

This support ticket is created hace 4 años, 1 mes. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Etiquetado: ,

This topic contains 2 respuestas, has 2 mensajes.

Last updated by tyeB hace 4 años, 1 mes.

Assisted by: Luo Yang.

Autor
Mensajes
#1538253

Tell us what you are trying to do?
I have a view which lists all posts using no pagination & AJAX results update when visitors change any filter values. Currently this is listing all results. I want to limit this to show the last 2 years only

Is there any documentation that you are following?
no

Is there a similar example that we can see?
no

What is the link to your site?
hidden link

#1538437

Hello,

You can add a Post date filter in the post view:
Select posts whose
Published date is after: year:PAST_ONE(2)

See our document:
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-date/

#1539833

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.