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:

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.

Related Functions

wp_random_content_post_limits, wp_get_random_content_post_types, wp_is_random_content_query, wp_random_content_pre_get_posts, wp_random_content_redirect

Top Google Results

User discussions

wpseek mobile