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 0 Comment on The Events Calendar: The event search
Continue reading MySQL server kills Relevanssi indexing

MySQL server kills Relevanssi indexing

A Relevanssi user reported a mystical database problem. After about two minutes of indexing, the server shuts down the indexing. This leaves MySQL queries hanging on the server, causing the site to crash. The only way to get the site back live was to reboot the whole MySQL server. Eventually, they were able to figure…

Read more MySQL server kills Relevanssi indexing 0 Comment on MySQL server kills Relevanssi indexing
Continue reading Adding custom functions to a site

Adding custom functions to a site

The Relevanssi knowledge base is full of code snippets and custom functions that you can use to enhance your site and to change how Relevanssi works. But where to place those snippets and functions? There are many different methods of adding custom functions to your site, and I will go through them in this article.…

Read more Adding custom functions to a site 0 Comment on Adding custom functions to a site
Continue reading Increasing weight for HTML tags

Increasing weight for HTML tags

Relevanssi ignores HTML tags when indexing posts. If you want to give more weight to words that appear in specific HTML tags (like headings), here is one way to do that. You can add this filter function on your site to the theme functions.php or in a code snippet: This code goes through the post…

Read more Increasing weight for HTML tags 0 Comment on Increasing weight for HTML tags
Continue reading Indexing image alt texts

Indexing image alt texts

Relevanssi by default ignores image alt texts (and other tag attributes). That’s often the right thing to do because alt texts aren’t visible to users. Finding a post with a search term that only appears in an alt text may confuse a user. If your alt texts are well crafted, they may help search. It’s…

Read more Indexing image alt texts 0 Comment on Indexing image alt texts
Continue reading Polylang attachment searching

Polylang attachment searching

If Polylang is in use and you haven’t enabled “Media translation“, your attachment files won’t have a language. That’s fine, except when Relevanssi searches fail to find your attachment because they’re looking for posts in a specific language. Suppose you want to include attachments in Polylang searches. In that case, you can either enable “Media…

Read more Polylang attachment searching 0 Comment on Polylang attachment searching
Continue reading Adding a search form in the navigation menu

Adding a search form in the navigation menu

WordPress doesn’t make it easy to add a search form in the navigation menu. It’s a popular request, though, and having access to the search in the site header is typical. Relevanssi itself doesn’t have opinions on the user interface. Some themes come with a built-in search feature in the header, like Twenty Twenty. That’s…

Read more Adding a search form in the navigation menu 0 Comment on Adding a search form in the navigation menu