wp-theatre
wp-theatre copied to clipboard
Calendar widget with dates in the past
Like I said on the support-forum : It would be a nice asset that you can go back to previous months in the Calendar widget to show past events (that are marked on the calendar).
Thanks!
Actually like at the bottom of www.pulpdeluxe.be where I used another plugin. There you can click on events in the past and go back a couple of months.
Hi! Alight, so this is my first comment on github. And as a disclaimer, I'm a scriptkiddy no to basic knowledge.
Having that said. I've fixed it by replacing the following:
in "wpt_calendar.php"
$filters = array( 'start' => 'now', );
to
$filters = array( $events_filters['start'] = date('2015-01-01', $start_time), );
(I know this isn't how it is supposed to be, but it seems to work, though I'm sure it breaks something else :) )
and
$start_time = strtotime($month); if ($start_time < time()) { $events_filters['start'] = 'now'; } else { $events_filters['start'] = date('Y-m-d', $start_time); }
to
$start_time = strtotime($month); if ($start_time < time()) { $events_filters['start'] = date('2015-01-01', $start_time); } else { $events_filters['start'] = date('Y-m-d', $start_time); }
Would be cool to make it possible with a option checkbox in widget setting. And as an option with the shortcode.
Again, major rookie here :)
Thanks a lot for submitting this! I will look into this when I'll be working on the next release.
Great! Thanks Jeroen. These functions are particular handy for a theatre that has, for example, a festival with multiple days.
Fijne avond!