Continue reading WPML: Replacing posts with translations

WPML: Replacing posts with translations

Here’s a different approach to WPML searching. By default, you have two options. You can include posts in all languages in the results, or you can only use the current language. This solution checks for matches also in other languages. If Relevanssi finds any, this script then replaces them with the translated posts. You get…

Read more WPML: Replacing posts with translations 0 Comment on WPML: Replacing posts with translations
Continue reading WooCommerce: Searching for orders

WooCommerce: Searching for orders

Searching for shop orders is tricky business with WooCommerce. WooCommerce blocks searching the orders. WooCommerce also keeps the order data in many different tables. Because of this complexity, the shop_order post type is not available for indexing. You can enable it by adding this to your theme functions.php: This is not enough, though. The order…

Read more WooCommerce: Searching for orders 0 Comment on WooCommerce: Searching for orders
Continue reading Visual Composer: Indexing headings

Visual Composer: Indexing headings

Relevanssi doesn’t by default index the headings in Visual Composer. This is because the vcex_heading shortcode Visual Composer for the headings stores the heading text inside a shortcode attribute. By default, Relevanssi does not index shortcode attributes. In this case, indexing the shortcode attribute is necessary. Fortunately it’s easy to fix with a simple function…

Read more Visual Composer: Indexing headings 0 Comment on Visual Composer: Indexing headings
Continue reading Search is ignoring accents

Search is ignoring accents

In general, searches ignore accents, which is generally a good idea: for example in French, the difference between e and é isn’t huge, and it’s fine if the search engine isn’t too picky about which is which. However, there are cases where there is a big difference: for example in Finnish, the letter ä isn’t…

Read more Search is ignoring accents 0 Comment on Search is ignoring accents
Continue reading Visual Composer: Indexing Raw HTML elements

Visual Composer: Indexing Raw HTML elements

Visual Composer and WP Bakery have a Raw HTML element that can be used to add HTML code on your pages. By default, this content is stored in an encoded format Relevanssi can’t read. Fortunately the encoding is simple Base64 encoding that is easy to read. So, in order to read the contents of the…

Read more Visual Composer: Indexing Raw HTML elements 0 Comment on Visual Composer: Indexing Raw HTML elements
Continue reading Support for ^ and $ anchoring operators

Support for ^ and $ anchoring operators

In regular expressions, ^ can be used to match beginning of the line and $ to match the end of the line. For example, ^ban will match banana, but not urban, while ban$ matches urban, but not banana. These are called anchoring operators. By default, Relevanssi matches either beginning or the end of the word,…

Read more Support for ^ and $ anchoring operators 0 Comment on Support for ^ and $ anchoring operators
Continue reading FacetWP

FacetWP

Relevanssi is generally well compatible with FacetWP, which provides advanced filtering and faceting capabilities for the search. There are however some situations where Relevanssi and FacetWP do not work well. Make sure you are using the Relevanssi integration plugin for FacetWP. It covers most of the problems. Disabling the FacetWP integration In some cases, however,…

Read more FacetWP 0 Comment on FacetWP