apply_filters( 'relevanssi_post_query_filter', string $query_restrictions, array $post_query )

This filter hook filters the post query MySQL.


(string) The MySQL query restrictions.

(array) An array of post query parameters: ‘in’ and ‘not in’.

More information

When Relevanssi processes query variables, it converts them to MySQL query restrictions. This filter hook lets you modify the MySQL query for post query parameters, post__in and post__not_in.

These parameters become “ AND relevanssi.doc IN ( post IDs )” and “ AND relevanssi.doc NOT IN ( post IDs )” respectively.