Category Archives: Knowledge Base

Knowledge base contains information on how to use Relevanssi. There are lots of features that are documented in the knowledge base. Here’s an index to the knowledge base, with all the entries sorted under different topics.

The most important troubleshooting trick

Advanced hacking, filter hooks

Search results pages

Search more



Adding a search form shortcode

There’s no shortcode in Relevanssi that would add a search form to a page. Adding a search form to just about anywhere is simple, though. It looks something like this: <form role="search" method="get" id="searchform" class="searchform" action=""> <label class="screen-reader-text" for="s">Search for:</label> <input type="text" value="" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Search" /> </form> Just replace […]

Making ‘ß’ and ‘ss’ equivalent

When users search for words with specific German characters like “ß” they don’t get the results for words containing “ss” instead. This is important not only for those users who are not sure about the spelling but also those from countries like Switzerland who use German but don’t have this character on their keyboard (apparently). […]

Using multiple custom taxonomies

Usually WordPress supports one category, one tag and one taxonomy in the search, if you use the query variables to set the taxonomies. You can enter multiple taxonomies as parameters to the query, but only the first one is used. If you want to have multiple taxonomies involved, you need to build a tax_query. The […]

Indexing additional content

Sometimes you may want to index additional content to your posts. Perhaps dynamic content generated by some PHP script, perhaps data from another, external database. It is quite easy, as there’s a simple filter you can use. When Relevanssi indexes a post, it calls relevanssi_content_to_index to see if there’s additional content to index. This filter […]

How to add custom fields to search excerpts

Getting Relevanssi to index custom fields and find posts by custom field content is easy – just list the custom fields in the appropriate setting and re-index. However, Relevanssi doesn’t include custom field content in the custom search excerpts by default – it doesn’t really know how to do that. It’s not particularly complicated, though. […]