apply_filters( 'relevanssi_taxonomy_term_to_post', object $post )
This filter hook lets you modify post objects Relevanssi Premium creates from taxonomy terms.
(object) The post object from the taxonomy term.
When Relevanssi Premium searches taxonomy terms, it needs to create posts, as search results templates want to see posts. This conversion happens in
relevanssi_premium_get_post(), and you can use this filter hook to adjust the post object created in the process.
The objects are not WP_Post objects but look like them. The taxonomy term name is stored in
$post->post_content has the term description.
$post->relevanssi_link has the taxonomy term archive URL from
$post->post_type is set to the taxonomy and the term ID is stored in
-1). The term parent is stored in
$post->post_parent. The post status for users is “
$post->post_date is set to the current time and
$post->post_author is set to
You can modify all these values with this filter hook.