Continue reading Category filter for search results pages

Category filter for search results pages

Sometimes it’s nice to have a category filter on the search results pages: a simple dropdown where you can choose the category you want to show. It’s easy to create one using wp_dropdown_categories() but on a search results page, that’s slightly problematic, as it’ll include all categories, not just those included in the search results.…

Read more Category filter for search results pages 33 Comments on Category filter for search results pages
Continue reading Infinite Scroll from Jetpack

Infinite Scroll from Jetpack

Jetpack has Infinite Scroll, which is a pretty cool feature, but unfortunately doesn’t work with Relevanssi on search results pages. Infinite Scroll uses WP_Query to get more posts, and that isn’t compatible with Relevanssi. I’m not aware of a solution that would allow Infinite Scroll to work with Relevanssi. There isn’t enough room for customization…

Read more Infinite Scroll from Jetpack 0 Comment on Infinite Scroll from Jetpack
Continue reading Adding extra boost for exact title matches

Adding extra boost for exact title matches

Every now and then, somebody wants to see exact title matches higher in the results. Usually, the best way to do this is to increase the title weight, maybe switch the default operator to AND and let the Relevanssi algorithm lift the best results. If that is not enough, you can use this code to…

Read more Adding extra boost for exact title matches 13 Comments on Adding extra boost for exact title matches
Continue reading Issues with post order plugins

Issues with post order plugins

If you’re getting low-quality results and the weight settings are not affecting the results, the first thing to check is to see if your results are coming from Relevanssi in the first place. That’s easy to check: disable Relevanssi and see if the results change. If the results change, they’re coming from Relevanssi. If the…

Read more Issues with post order plugins 0 Comment on Issues with post order plugins
Continue reading Restricting Did you mean suggestions to one post type

Restricting Did you mean suggestions to one post type

Sometimes it may be necessary to restrict the Did you mean suggestions Relevanssi serves to just one post type. There’s no option for that, as by default the Relevanssi database the Did you mean suggestions use as a source (this only applies to Premium, that is) doesn’t have any information about the post types the…

Read more Restricting Did you mean suggestions to one post type 0 Comment on Restricting Did you mean suggestions to one post type
Continue reading Results are in strange order

Results are in strange order

If best results don’t come up first and changing weighting settings doesn’t seem to make any difference, there couple of things you can do. Is Relevanssi active? The first thing is to check if the results are actually provided by Relevanssi. If you disable Relevanssi, do the results change? Do you see Relevanssi-generated excerpts? There…

Read more Results are in strange order 3 Comments on Results are in strange order
Continue reading Indexing custom post statuses

Indexing custom post statuses

If you’re using custom post statuses, Relevanssi requires some tinkering. By default, Relevanssi only handles posts that are of status publish, pending, draft or private. Relevanssi has a filter that lets you add more statuses to the list of acceptable statuses for Relevanssi. Add this to your site: This function, added to the two filters,…

Read more Indexing custom post statuses 4 Comments on Indexing custom post statuses
Continue reading Yoast Local SEO

Yoast Local SEO

Yoast Local SEO plugin breaks Relevanssi search. It enhances the search by adding meta queries. Unfortunately they don’t work with Relevanssi. The fix is simple, though. Add this to the theme functions.php: add_filter( ‘relevanssi_modify_wp_query’, ‘rlv_meta_fix’, 99 ); function rlv_meta_fix( $q ) { $q->set( ‘meta_query’, array() ); return $q; }add_filter( ‘relevanssi_modify_wp_query’, ‘rlv_meta_fix’, 99 ); function rlv_meta_fix(…

Read more Yoast Local SEO 14 Comments on Yoast Local SEO