Tag Archive pages showing no content or only partial content
-
In the query being injected into WP_QUERY for the tag archive pages there is a bug. The queries add a date filter, which also is applied to posts of other types. With the effect that no content is found, or only events being shown on the tag archive page (Posts tagged with…).
Also a “group_by” is added which effect is that only one archive entry is shown (frontend or backend). Please check for yourself if these changes are correct, they worked for us:
File: event-organiser/includes/event-organiser-archives.php
Function: eventorganiser_event_groupby( $groupby, $query )
if (! is_admin()) { if(!empty($query->query_vars['group_events_by']) && $query->query_vars['group_events_by'] == 'series'){ return "{$wpdb->eo_events}.post_id"; } if( eventorganiser_is_event_query( $query ) ): if(!empty($groupby)) return $groupby; return "{$wpdb->eo_events}.event_id"; endif; } return $groupby;
Function: eventorganiser_events_where( $where, $query )
//Check date ranges were are interested in. $date_queries = array( 'event_start_after'=>array( 'notstrict' =>" AND ({$wpdb->eo_events}.event_id IS NULL OR ({$wpdb->eo_events}.event_id IS NOT NULL AND {$wpdb->eo_events}.StartDate >= %s)) ", 'strict' => " AND ({$wpdb->eo_events}.event_id IS NULL OR ({$wpdb->eo_events}.event_id IS NOT NULL AND ({$wpdb->eo_events}.StartDate > %s OR ({$wpdb->eo_events}.StartDate = %s AND {$wpdb->eo_events}.StartTime > %s)))) " ), 'event_start_before'=>array( 'notstrict' =>" AND ({$wpdb->eo_events}.event_id IS NULL OR ({$wpdb->eo_events}.event_id IS NOT NULL AND {$wpdb->eo_events}.StartDate <= %s)) ", 'strict' => " AND ({$wpdb->eo_events}.event_id IS NULL OR ({$wpdb->eo_events}.event_id IS NOT NULL AND ({$wpdb->eo_events}.StartDate < %s OR ({$wpdb->eo_events}.StartDate = %s AND {$wpdb->eo_events}.StartTime < %s)))) " ), 'event_end_after'=>array( 'notstrict' =>" AND ({$wpdb->eo_events}.event_id IS NULL OR ({$wpdb->eo_events}.event_id IS NOT NULL AND {$wpdb->eo_events}.EndDate >= %s)) ", 'strict' => " AND ({$wpdb->eo_events}.event_id IS NULL OR ({$wpdb->eo_events}.event_id IS NOT NULL AND ({$wpdb->eo_events}.EndDate > %s OR ({$wpdb->eo_events}.EndDate = %s AND {$wpdb->eo_events}.FinishTime > %s)))) " ), 'event_end_before'=>array( 'notstrict' =>" AND ({$wpdb->eo_events}.event_id IS NULL OR ({$wpdb->eo_events}.event_id IS NOT NULL AND {$wpdb->eo_events}.EndDate <= %s)) ", 'strict' => " AND ({$wpdb->eo_events}.event_id IS NULL OR ({$wpdb->eo_events}.event_id IS NOT NULL AND ({$wpdb->eo_events}.EndDate < %s OR ({$wpdb->eo_events}.EndDate = %s AND {$wpdb->eo_events}.FinishTime < %s)))) " ) );
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Tag Archive pages showing no content or only partial content’ is closed to new replies.