Skip to content

Commit 0adecec

Browse files
authored
Merge pull request #53 from a8cteam51/fix/gh52-incorrect-date-titles-on-caelendar
Ensure that the filters are not used when the calendar is used on an …
2 parents f6bc21c + 747f538 commit 0adecec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/classes/class-se-blocks.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,11 @@ public static function calendar_render( $attributes = array() ) {
767767
$previous_date_time = SE_Calendar::get_instance()->get_previous_month_with_events( $current_date_time );
768768
$next_date_time = SE_Calendar::get_instance()->get_next_month_with_events( $current_date_time );
769769

770+
// If this being loaded on an archive page, ensure event query filters are removed.
771+
if ( is_archive() && in_array( get_post_type(), array( SE_Event_Post_Type::$post_type, SE_Event_Post_Type::$event_date_post_type ), true ) ) {
772+
SE_Event_Query_Utils::remove_event_query_filters();
773+
}
774+
770775
$current_date = $current_date_time->format( 'Y-m-01' );
771776
$month_data = SE_Calendar::get_instance()->get_month_days( $current_date );
772777

0 commit comments

Comments
 (0)