apply_filters( 'relevanssi_missing_terms_must_have', string $must_have )

Filters the “Must have” part of the “Missing terms” list in Relevanssi Premium.


(string) The “Must have” element, default ' | ' . __( 'Must have', 'relevanssi' ) . ': <a href="' . $search_page_url . '">' . $search_term . '</a>'.

More information

When Relevanssi creates the “Missing terms” list, if there’s just one term missing and Relevanssi Premium is used, Relevanssi will add a “Must have” part to the end of the list, with a link to the search results where the missing word is required (a + operator is added in front of the word).

The search page URL is constructed from the current page URL, with just the + added in the query.

If you want to disable this feature while keeping the “Missing terms” list, you can have this filter hook return an empty value:

add_filter( 'relevanssi_missing_terms_must_have', '__return_empty_string' );

To edit the “Missing terms” part, see relevanssi_missing_terms_tag and relevanssi_missing_terms_template.