Skip Navigation

[Resolved] Display posts from last 30 days on custom date field

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

Problem:

Setup filter on custom date field.

Solution:

For the custom date fields, it does not need custom PHP codes, you can follow our document to setup the date filters within GUI, for example:
Select items with field:
date-of-review is a number greater than PAST_DAY(31)

Relevant Documentation:

https://toolset.com/documentation/user-guides/date-filters/

This support ticket is created 5 years, 9 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 – 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)

This topic contains 4 replies, has 2 voices.

Last updated by Edward Barker 5 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1212369

That's great, really simple fix.

If I wanted to apply it to a custom date field in a post type (slug - date-of-review , post type - reviews) how would I go about doing that?

Many thanks as always!

#1212379

Hello,

For the custom date fields, it does not need custom PHP codes, you can follow our document to setup the date filters within GUI, for example:
Select items with field:
date-of-review is a number greater than PAST_DAY(31)

More help:
https://toolset.com/documentation/user-guides/date-filters/

#1219755

Perfect, thank you!

#1220122

Is this problem resolved? please let me know if you still need more assistance for it, feel free to create new ticket if there is any other new questions. thanks

#1222506

My issue is resolved now. Thank you!