Problem:
I'm trying to get the events to auto-expire and remove themselves from the locations page using CRED.
Unfortunately, I can't get the post type Events to auto expire. If I set the expiration date on the event, it changes itself to a draft, but still displays on the front end. I can only get it to expire if I set it to auto-expire in the Intermediary post type, but that would require finding every event-location combination and setting each one to expire individually.
Is there any way to get one post type to expire from another when they're in a many-to-many relationship?
Solution:
There isn't such a built-in feature within CRED that:
get one post type to expire from another when they're in a many-to-many relationship
According to our document:
https://toolset.com/documentation/user-guides/automatic-post-expiration/
If you setup the "auto-expire" in the posts of Intermediary post type, CRED plugin will only change the post status of posts of Intermediary post type, it can not change the status of of other posts.
For the problem you mentioned above:
If I set the expiration date on the event, it changes itself to a draft, but still displays on the front end
You can create a view list "event" posts, filter by post status = "publish", then it should not output posts in "draft" status.
see our document:
https://toolset.com/documentation/user-guides/filtering-views-query-by-post-status/
Relevant Documentation:
https://toolset.com/documentation/user-guides/automatic-post-expiration/
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 6 years, 1 month ago.
Assisted by: Luo Yang.