Continue reading FileBird: Filtering attachments by folder

FileBird: Filtering attachments by folder

FileBird is one of many WordPress plugins that provide more control over the attachments in the Media Library. You can use the FileBird folders in Relevanssi searches to filter attachments based on their folder. Here’s a simple function you can add to your site: Once you add this, you can use the folder parameter to…

Read more FileBird: Filtering attachments by folder 0 Comment on FileBird: Filtering attachments by folder
Continue reading Polylang: Bilingual search

Polylang: Bilingual search

By default, Relevanssi indexes the different language versions of the posts separately. If your site is in French and English, searching for the English text will find the English posts and searching for the French text will find the French posts. But what if you want the French search terms to find the English post…

Read more Polylang: Bilingual search 8 Comments on Polylang: Bilingual search
Continue reading ACF: Indexing files from File fields

ACF: Indexing files from File fields

Relevanssi can index attachment contents from files linked to posts with ACF File fields. This does not happen automatically but requires some extra code. The code required depends on which return value you use for your ACF File fields. If you use “File ID”, the code looks like this: For “File Array”, the code looks…

Read more ACF: Indexing files from File fields 1 Comment on ACF: Indexing files from File fields
Continue reading Index only short numbers

Index only short numbers

Relevanssi has a minimum word length setting that is set to three characters. Any one- or two-letter words are not indexed unless you change this setting from the Relevanssi advanced indexing settings. Sometimes it would be helpful to ignore short words but to index one- and two-digit numbers. You can do that with a bit…

Read more Index only short numbers 0 Comment on Index only short numbers
Continue reading ACF: Filtering custom fields by type

ACF: Filtering custom fields by type

On sites where ACF fields are used a lot, with Flexible Content and Repeater fields, it may be difficult to make Relevanssi only index the relevant ACF fields. One way to deal with problem is to set Relevanssi to index “visible” custom fields and then restrict the indexed fields by field type. Add this function…

Read more ACF: Filtering custom fields by type 0 Comment on ACF: Filtering custom fields by type
Continue reading WPML: Indexing synced posts

WPML: Indexing synced posts

When a post is updated, WPML updates all the translations of the post, but Relevanssi only indexes the post that was updated, not the corresponding posts in other languages. This method hooks into save_post after WPML to tell Relevanssi also to index the matching translations. Thanks to Garrett McGilvray / Éditions CEB. There’s a similar…

Read more WPML: Indexing synced posts 0 Comment on WPML: Indexing synced posts
Continue reading Automatic redirects to category archives

Automatic redirects to category archives

While Relevanssi Premium can return taxonomy terms as search results, sometimes sending the searcher directly to the category archive is better. This is especially true for WooCommerce sites, where displaying taxonomy terms in search results pages is complicated. Relevanssi Premium has a redirect feature you can use to redirect searches to specific pages. This is…

Read more Automatic redirects to category archives 0 Comment on Automatic redirects to category archives
Continue reading Indexing fails? Check max_allowed_packet!

Indexing fails? Check max_allowed_packet!

Sometimes Relevanssi can get stuck in the indexing. Relevanssi goes past the number of posts in the database and keeps indexing the posts. One possible cause is a too small max_allowed_packet value for your MySQL server. This value controls how big queries your MySQL server can take. You can see the current value with one…

Read more Indexing fails? Check max_allowed_packet! 0 Comment on Indexing fails? Check max_allowed_packet!
Continue reading Reading wpDataTables imported tables

Reading wpDataTables imported tables

The wpDataTables table plugin has several ways to handle tables. Some of them work with Relevanssi without problems; some don’t. You may notice that Relevanssi doesn’t index the entire table contents for wpDataTables tables (mainly imported tables). This is because the wpDataTables shortcode does not always expand to the entire table; it only features part…

Read more Reading wpDataTables imported tables 0 Comment on Reading wpDataTables imported tables