Skip Navigation

[Resolved] Exclude past events from view

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

Problem:
Exclude past events from view

Solution:
You should filter your view by your custom date field greater than equal to Now() by adding a query filter from query filter section of your view.

For example:

Select items with field: your date field is a UNSIGNED greater than or equal NOW()   

You can find the proposed solution, in this case with the following reply:
https://toolset.com/forums/topic/exclude-past-events-from-view/#post-1248003

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/
=> 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by alexandreG-2 5 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#1247503

Hi,

I have created a view with date based events. I would like exclude automatically from the view past events.

I have looked around but didn't find what I am looking for.

Any help would be appreciated

#1247579

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I would like to know here first are you using any events plugin or you have the custom date field that holds the event end date?

#1247935

Hi Minesh,

Yeah, sorry, I didn't give muche details.

iI have created a CPT called events. So I'm using only custom fields created with Types and displayed with Views. No Event manager plugin involved.

You can have a look at hidden link

#1248003

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - You should filter your view by your custom date field greater than equal to Now() by adding a query filter from query filter section of your view.

For example:

Select items with field: your date field is a UNSIGNED greater than or equal NOW()   

More Info:
=> https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/
=> https://toolset.com/documentation/user-guides/date-filters/

#1248021

Hi Minesh,
COuld you check this quick video ? It explains my issue.

hidden link

Thanks a lot

#1248027

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - when you edit your view, you will see "Screen Options" button on top right side click on that and checkmark the "Query Filter" checkbox and then you will be able to see the "Query Filter" section.

Once you see that section, add query filter for your date custom field as instructed in my previous reply.

#1248029

My issue is resolved now. Thank you!