Skip Navigation

[Resolved] Don't show the posts after expiry dates

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 3 replies, has 2 voices.

Last updated by Luo Yang 1 year, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#2566665

I have created a loop on the link hidden link which has some last dates. I don't want to show them after the expiry dates.

#2566711

Hello,

How do you setup the "expiry date"?
If it is a custom date field, you can add a date filter into the post view, and display only the posts are not expired:
https://toolset.com/de/course-lesson/filtering-custom-lists-of-posts/#filtering-by-custom-field

If you are using Toolset Post Forms to setup the expiration date, you can follow our document to update the post status after posts are expired:
https://toolset.com/course-lesson/setting-up-automatic-post-expiration/

#2566775
Toolset-1.png

I am trying to do this with the custom date field but it is not filtering as also visible in the screenshot.

I am trying to display only those posts which have a custom date field greater than today.

Also, I am looking for the same solution for this page hidden link, it is the custom archive page I want to know about the feasibility of the same.

#2567303

You just need to setup the date field filter as below:
Select items with field:
YOUR-DATE-FIELD is a number greater than TODAY()

See below test site:
Login URL:
hidden link

Page with view block:
hidden link

In frontend, it shows correctly:
hidden link