wp_random_content_posts_orderby
wp_random_content_posts_orderby ( $orderby, $query )
Parameters:- (string) orderby The ORDER BY clause of the query.
- (WP_Query) query The WP_Query instance.
Returns:- (string) The ORDER BY clause of the query.
Defined at: - Introduced in WordPress: 7.2.0
- Deprecated in WordPress: —
Description
Orders the random content query randomly.Added to the {@see 'posts_orderby'} filter by {@see \WP::handle_random()} while the random
content query runs. Enforcing the order in SQL prevents {@see 'pre_get_posts'}
callbacks setting the order of posts on archives from affecting the selection.