mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-04 10:05:43 +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
1 changed files with 2 additions and 1 deletions
|
@ -425,7 +425,8 @@ function filter_query( $query ) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$query->set( 'orderby', 'rand' );
|
$date = date( 'Ymd' );
|
||||||
|
$query->set( 'orderby', "RAND($date)" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue