Pledge List: Sort randomly by default for fairness.

See #70
This commit is contained in:
Ian Dunn 2019-11-02 13:26:22 -05:00
parent bac15d21fc
commit 11b9bf3604
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB
2 changed files with 8 additions and 1 deletions

View file

@ -260,6 +260,13 @@ function filter_query( $query ) {
$query->set( 'orderby', 'meta_value_num' );
$query->set( 'order', 'DESC' );
break;
default:
$query->set( 'orderby', 'rand' );
break;
}
}
// todo remove this when `rand` pagination fixed, see https://github.com/WordPress/five-for-the-future/issues/70#issuecomment-549066883
$query->set( 'posts_per_page', 100 );
}