Continue reading Polylang Pro: Indexing synced posts

Polylang Pro: Indexing synced posts

Polylang Pro has a feature to sync translations between posts. The problem with this and Relevanssi is that Relevanssi does not index the changes to the synced posts. With this filter function added to your site, Relevanssi will also index the synced posts: Thanks to Nico von Niederhäusern / Cubetech. There’s also a method for…

Read more Polylang Pro: Indexing synced posts 0 Comment on Polylang Pro: Indexing synced posts
Continue reading 10Web Photo Gallery

10Web Photo Gallery

The Photo Gallery plugin from 10Web uses a shortcode to add photo galleries to posts and pages. By default, Relevanssi doesn’t index the gallery contents. Photo Galler only registers the shortcode in the front end, so when Relevanssi indexes pages in the admin context, Relevanssi only sees the shortcode, not the gallery contents. To fix…

Read more 10Web Photo Gallery 0 Comment on 10Web Photo Gallery
Continue reading Search form: Search only in titles

Search form: Search only in titles

If you want to add an option to search only in titles to your search form, here’s how. First, you need to modify the search form to add the selection. To add a simple dropdown, add this to your search form: This select element will create a small dropdown with the option to search everything…

Read more Search form: Search only in titles 0 Comment on Search form: Search only in titles
Continue reading Integrating Koko Analytics stats

Integrating Koko Analytics stats

It’s possible to integrate all kinds of external data to Relevanssi weights. Koko Analytics is a great analytics plugin. It collects stats about your visitors and stores them in the local database, which means those stats are available for Relevanssi. For some sites, this makes a lot of sense. For example, I have Kirjavinkit, a…

Read more Integrating Koko Analytics stats 0 Comment on Integrating Koko Analytics stats
Continue reading How to block searches without a search term

How to block searches without a search term

By default, Relevanssi returns all posts when searching without a search term. That’s the default WordPress behaviour. Sometimes it may not be the wanted behaviour. One reason is performance: returning all results can be very slow. To stop Relevanssi from running when there’s no search term, add this to your site: This little function will…

Read more How to block searches without a search term 2 Comments on How to block searches without a search term
Continue reading German umlauts

German umlauts

By default, the search ignores German umlauts. Searching for “uber” will also find “über” and so on. This ignorance is not a Relevanssi feature but instead governed by your database. The default database collation WordPress uses (utf8mb4_unicode_ci) ignores all accents, including umlauts. If you want the search to care about umlauts, you can change the…

Read more German umlauts 1 Comment on German umlauts
Continue reading Attachment file content cannot be saved

Attachment file content cannot be saved

The Relevanssi error “Could not save the file content to the custom field” means that Relevanssi has managed to read the attachment contents but cannot save them to the _relevanssi_pdf_content custom field Relevanssi uses to store the attachment contents. Relevanssi uses the update_post_meta() function to save the content, and for some reason, that function is…

Read more Attachment file content cannot be saved 0 Comment on Attachment file content cannot be saved
Continue reading The Events Calendar: The event search

The Events Calendar: The event search

The event search from The Events Calendar does not work when Relevanssi is enabled. In regular use, it works, but if you try to access the event list directly with a search term in the URL, the search finds nothing. One solution is to make Relevanssi index the tribe_events post type. Then you can enable…

Read more The Events Calendar: The event search 7 Comments on The Events Calendar: The event search