Yes they are.
How would you like to show them?
Jeroen
Hi, Great plug-in!
Filtering would be easiest when the same as the current upcoming events shortcodes:[wpt_production_events] & [wpt_events]
But an additional argument like these would be awesome:
- “past events” (usable in conjuntion with current existing arguments like “season” and groupby etc etc.)
or
- something like
“between date x and date y”
A PHP solution/direction would also be very helpful for now 🙂
This can’t be done right now without hacking the plugin.
I propose to implement it in a future version like this:
[wpt_events past="true" upcoming="true"]
to show both past and upcoming events and:
[wpt_events upcoming="false" past="true"]
to show only past events.
Or maybe:
[wpt_events start="now"]
[wpt_events start="today"]
[wpt_events start="2014-09-02"]
[wpt_events end="now"]
[wpt_events start="2014-09-01" end="2014-10-01"]
If you like you can follow any progress on this issue over here:
https://github.com/slimndap/wp-theatre/issues/58
Thanks for your answer.
That solution would sure give a lot of flexibility to retrieve events.
For the time being however, how can I show the past events at this moment? only with php? what code to use ?
You need to use something like:
$events = wp_theatre->events->load();
foreach ($events as $event) {
if ($event->datetime() < time()) {
echo $event->html();
}
}
I didn’t test the code above. If you like, I can dive into the code of your website and do it for you (for a small fee).
Hi,
This feature was added to the latest version of the plugin (0.9).
See https://github.com/slimndap/wp-theatre/wiki/Shortcodes for more examples.
Jeroen