Continue reading WooCommerce: Make Relevanssi notice stock changes

WooCommerce: Make Relevanssi notice stock changes

In some cases, WooCommerce product stock level changes don’t affect the search immediately. If the search is set up to exclude out-of-stock items, a product that sells out may still be included in the search until the next reindexing. This happens because changes in the stock status don’t trigger a WordPress post update that Relevanssi…

Read more WooCommerce: Make Relevanssi notice stock changes 0 Comment on WooCommerce: Make Relevanssi notice stock changes
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 0 Comment 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 0 Comment on ACF: Indexing files from File fields
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 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