Skip Navigation

[Resolved] Query filter for showing events for the next 30 days

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

Problem:

Filter the view by a custom date field:
show 30 days of events from the actual date

Solution:

You just need to setup a custom field filter on field "srow", for example:

Select items with field:
srow is a UNSIGNED lower than or equal FUTURE_DAY(30)

Relevant Documentation:

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

This support ticket is created 5 years, 8 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.

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)

This topic contains 4 replies, has 2 voices.

Last updated by jozsefG 5 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#1092961

Hello

I need help with this project again. I create Events with the EventOn plugin, and I show them on a toolset map as markers. In this ticket I'd got help how to convert the non-types date field and show the date as marker info: https://toolset.com/forums/topic/convert-non-types-date-field-timestamp-to-date/

Now I need to limit the events to show only one month. It would be great to show 30 days of events from the actual date on but I couldn't find this option in date filters so I tried current month. But the problem is that it shows no map if I set this in the query filter of the parent view for the events. I guess this can't be this simple because the "srow" field is a timestamps.

Maybe it would be easier if I give access to the site admin because it starts to be a little too complex to explain every detail in text here...

You can look at the map on the homepage: hidden link

#1093672

Hello,

I assume the custom field "srow" is storing value in timestamp format, and field "srow" is registered to post type "Event", and you are using Views to query the "Event" posts, you are going to filter the result by field "srow" is no more than future 30 days.

If it is, it is possible within Views plugin, you just need to setup a custom field filter on field "srow", for example:
Select items with field:
srow is a UNSIGNED lower than or equal FUTURE_DAY(30)

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

#1093691

Thank you, I tried it. Unfortunately it is not working, the map is not showing at all.

#1093702

Pleas provide a test site with the same problem, also point out the problem page URL and view URL, I need a live website to test and debug.

#1093707

Soooory, I messed up something, and it is working!! Mea culpa...
Thank you Luo Yang for your help!

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