wzkb_related_post_score
Sort the related query by a simple relevance score using shared taxonomies and recency.
Type: filter
Since: 3.0.0
Source: includes/frontend/class-related.php line 393
Parameters
| Type | Name | Description |
|---|---|---|
\WP_Query | $query | Related posts query. |
int[] | $category_ids | Category term IDs from the origin post. |
int[] | $tag_ids | Tag term IDs from the origin post. |
array | $args | Original query arguments. |
Usage
add_filter( 'wzkb_related_post_score', function($query, $category_ids, $tag_ids, $args) {
// ...
return $query;
} );