Skip to main contentSkip to footer

Relevanssi Premium 2.4.4 introduced a new feature where you can target specific parts of the post straight from the search terms. The format for this is

{target:search_term}

Target can be one of the following:

These are all compared against Relevanssi index, so you can use any of these targets only if Relevanssi indexes that particular type of content: if you want to, say, target excerpts, you need to make sure Relevanssi is set to index the excerpt.

The search term must be a single word, so if you want to target multiple words, use a specifier for each word separately. Phrases are supported.

Examples:

Search for word “cat” in titles only:

{title:cat}

Search for word “dog”, but only in tags:

{tag:dog}

Search for posts that have the word “knizia” in the taxonomy “designers” and the word “dutrait” in the taxonomy “illustrators”:

{designers:knizia} {illustrators:dutrait}

Note that for multiple targeted terms, you need to have a space between the terms.

Search for posts that have the phrase “Reiner Knizia” in the taxonomy “designers”:

{designers:"reiner knizia"}