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

Tools

Troubleshooting

Plugin compatibility

Theme compatibility

Restricting the indexing to particular user roles

From the Relevanssi settings, you can only choose whether subscribers are indexed or not. If you need finer control over what user roles are indexed by Relevanssi, you can use the following code. Place it in your theme functions.php: add_filter(’relevanssi_user_index_ok’, ‘rlv_do_not_index_admins’, 10, 2); function rlv_do_not_index_admins($do_index, $user) { $block_these_roles = array(’administrator’, ‘editor’, ‘author’, ‘contributor’, ‘subscriber’);   […]

bbP Private Groups support

Private Groups is a plugin that makes bbPress forum groups private. Relevanssi, however, doesn’t understand that privacy and will show those groups in the search results. Relevanssi has means to support this, however, with the help of the relevanssi_post_ok filter. Here’s some code from Mark Wass that makes the private forum posts private in search. […]

Utf8mb4 charset and index problems

If you use utf8mb4 charset, Relevanssi database table may be missing an index. That’s because part of the index includes a column type that is of varchar(210) type. This is fine with utf8, but fails for utf8mb4, which only allows columns 191 characters long (because maximum column size is 767 bytes, and for 4-byte utf8mb4 […]

Relevanssi Premium as a Composer package

If you want to install Relevanssi Premium as a Composer package, you can use the following URL to fetch the latest version: https://www.relevanssi.com/update/fetch_latest_version.php?api_key=XXX Just replace XXX with your valid API key. The URL will always return the latest version of the plugin files. There’s no way to get a specific version of Relevanssi. The Composer […]

Indexing Profile Builder Pro -generated users

Profile Builder Pro is a fine tool for managing user profiles. However, profiles created by Profile Builder Pro front end forms do not get automatically indexed by Relevanssi. This is because of the user account generation process in Profile Builder Pro doesn’t probably trigger all the filter hooks WP does, and thus Relevanssi doesn’t notice […]

Category filter for search results pages

Sometimes it’s nice to have a category filter on the search results pages: a simple dropdown where you can choose the category you want to show. It’s easy to create one using wp_dropdown_categories(), but on a search results page that’s slightly problematic, as it’ll include all categories, not just those included in the search results. […]

ACF subfields

If you have subfields or repeater fields in ACF, Relevanssi doesn’t understand the field_%_subfield notation. You can have Relevanssi index subfields by setting the custom field setting to all: that makes Relevanssi index all custom fields, which includes the repeater fields. If you want more control, Simon Wheatley has created Relevanssi: add ACF subfields to […]