Skip to content

Commit

Permalink
Fix bug regarding to 'no events found' for past day links on widget c…
Browse files Browse the repository at this point in the history
…alendar. Fixes #30.
  • Loading branch information
stephenharris committed Jun 14, 2014
1 parent b55721c commit c7ba091
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions includes/event-organiser-archives.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ function eventorganiser_pre_get_posts( $query ) {
if( ! eventorganiser_is_event_query( $query, true ) )
return $query;


//@see https://github.com/stephenharris/Event-Organiser/issues/30
if( $query->is_main_query() ){
if( eo_is_event_archive( 'day' ) || eo_is_event_archive( 'month' ) || eo_is_event_archive( 'year' ) ){
$query->set( 'showpastevents', true );
}
}

$blog_now = new DateTime(null, eo_get_blog_timezone());

//Determine whether or not to show past events and each occurrence. //If not set, use options
Expand Down

0 comments on commit c7ba091

Please sign in to comment.