We have built a feed using Toolset on the page linked below. We noticed that the events are being removed before the start time. Ideally, they would be removed at 12am the day after the start date.
We are using the following logic to display the posts:
"EventStartDate is greater than or equal to today()"
I checked the main TEC feed and noticed that the behavior is slightly different. Rather than pulling the event out of the feed at 12am the day of the event (as it seems to in the Toolset feed) the events get pulled out as soon as the start time is reached.
Link to a page where the issue can be seen:
hidden link
Hello,
There isn't such a built-in feature within Views plugin, in your case, you can create a custom shortcode to get the timestamp value of today's 12AM, then pass it to view.
For example:
1) Create a custom shortcode "today_12am_ts", put below codes into your theme file functions.php:
add_shortcode('today_12am_ts', function($atts, $content){
return strtotime('Today 12am', current_time('timestamp'));
});
2) Dashboard-> Toolset-> Settings-> Front-end Content
in section "Third-party shortcode arguments", add the shortcode name: today_12am_ts
3) Edit your post view, change the date field filter as below:
Select items with field:
EventStartDate is a number greater than or equal VIEW_PARAM(ts)
See screenshot ts-filter.JPG
4) Display above post view's shortcode as below:
[wpv-view name="VIEW-SLUG" ts='[today_12am_ts]']
More help:
Controlling the filter with shortcode attributes
https://toolset.com/documentation/user-guides/passing-arguments-to-views/#controlling-the-filter-with-shortcode-attributes