Continue reading Adding extra weight to AND results in an OR search

Adding extra weight to AND results in an OR search

My Relevanssi engine has the AND operator enabled, with a fallback to OR when the search finds no matches. I’d like the search to display first the AND results and later the OR results. For example, if I search for “wedding party”, I’d like the search to show first the entries matching both words and…

Read more Adding extra weight to AND results in an OR search 0 Comment on Adding extra weight to AND results in an OR search
Continue reading Adding a custom field filter in the search

Adding a custom field filter in the search

Adding a custom field filter in a Relevanssi search takes a little bit of programming, because the filter needs to create a meta_query that Relevanssi understands. Let’s assume we have some colour information in a custom field that’s called colour_field, and we want to use that to filter the search results. First, let’s add a…

Read more Adding a custom field filter in the search 48 Comments on Adding a custom field filter in the search
Continue reading WooCommerce: Popularity and price sorting

WooCommerce: Popularity and price sorting

Many WooCommerce users use search sorting that allows users to sort by popularity or price. Unfortunately, while Relevanssi works fine with WooCommerce, those sorts do not work. Relevanssi doesn’t know about price or popularity, and the sorting assumes there’s a default WP search underneath. Relevanssi doesn’t do meta field sorting as easily as the default…

Read more WooCommerce: Popularity and price sorting 39 Comments on WooCommerce: Popularity and price sorting