wp-theatre icon indicating copy to clipboard operation
wp-theatre copied to clipboard

Calendar widget with dates in the past

Open studiomcpike opened this issue 8 years ago • 4 comments

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!

studiomcpike avatar Apr 05 '16 22:04 studiomcpike

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.

ss1

studiomcpike avatar Apr 09 '16 17:04 studiomcpike

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 :)

StudioRATATA avatar Oct 20 '16 19:10 StudioRATATA

Thanks a lot for submitting this! I will look into this when I'll be working on the next release.

slimndap avatar Oct 20 '16 19:10 slimndap

Great! Thanks Jeroen. These functions are particular handy for a theatre that has, for example, a festival with multiple days.

Fijne avond!

StudioRATATA avatar Oct 20 '16 19:10 StudioRATATA