crp_fill_random_posts
Set the flag if CRP should fill random posts if there is a shortage of related posts.
Type: filter
Since: 3.2.0
Source: includes/class-crp-core-query.php line 1340
Parameters
| Type | Name | Description |
|---|---|---|
bool |
$fill_random_posts |
Fill random posts flag. Default false. |
\WP_Post[] |
$posts |
Array of post objects. |
\WP_Query|\CRP_Query |
$query |
The WP_Query or CRP_Query instance. |
Usage
add_filter( 'crp_fill_random_posts', function($fill_random_posts, $posts, $query) {
// ...
return $fill_random_posts;
} );