Fix calendar query for scoreboards
This commit is contained in:
@@ -238,8 +238,7 @@ class SP_Calendar extends SP_Custom_Post {
|
||||
);
|
||||
}
|
||||
|
||||
if ( 'auto' === $this->date ) {
|
||||
if ( 'any' === $this->status ) {
|
||||
if ( 'auto' === $this->date && 'any' === $this->status ) {
|
||||
$args['post_status'] = 'publish';
|
||||
$args['order'] = 'DESC';
|
||||
$args['posts_per_page'] = ceil( $this->number / 2 );
|
||||
@@ -252,7 +251,6 @@ class SP_Calendar extends SP_Custom_Post {
|
||||
$fixtures = get_posts( $args );
|
||||
|
||||
$events = array_merge_recursive( $results, $fixtures );
|
||||
}
|
||||
} else {
|
||||
$events = get_posts( $args );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user