apply_filters( 'relevanssi_post_type_to_post', stdClass $post )
This hook filters the fake post Relevanssi creates from a post type archive.
Parameters
$post
(stdClass) The post object that Relevanssi created from the post type archive.
More information
Relevanssi Premium can index post type archives. Because the search results expect posts, Relevanssi generates fake posts from the post type archive objects.
You can use this filter hook to modify those fake posts. The filter gets stdClass
objects, but the object attributes match those of WP_Post objects. The post_type
of post type archives is post_type
, and Relevanssi stores the name of the post type in $post->post_type_id
. The $post->post_title
is the post type label and $post->post_content
is the description.