mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-02 01:01:18 +03:00
Pledge List: Change list order daily
Using a seed for the RAND function, based on the date, will randomize the list each day, while keeping the order consistent across any pagination.
This commit is contained in:
parent
bdbf6d573e
commit
fe351ae6f8
|
@ -425,7 +425,8 @@ function filter_query( $query ) {
|
|||
break;
|
||||
|
||||
default:
|
||||
$query->set( 'orderby', 'rand' );
|
||||
$date = date( 'Ymd' );
|
||||
$query->set( 'orderby', "RAND($date)" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue