Skip to main contentSkip to footer

These versions collect all the bug fixes and small improvements that I ran into during the summer. Next up is Premium 2.16, which will add bigger new features: at the moment I’m looking at developing proximity sorting (ie. show results that are nearest based on coordinates) and better search tracking. These will take some time to develop, though, so I wanted these smaller improvements out first.

New features

Changed behaviour

  • Premium. The spam block now returns a 410 Gone status code for blocked pages.
  • Premium. The minimum capability for seeing the Gutenberg sidebar or the Relevanssi meta box is changed from manage_options to edit_others_posts in order to allow editors see the sidebar and the meta box. If you prefer the original way, use the relevanssi_sidebar_capability filter hook to adjust.

Minor fixes

  • Relevanssi removes HTML comments better from the post content.
  • Sometimes the Did you mean would return really weird long suggestions from the search logs. That won’t happen anymore.
  • Oxygen compatibility has been improved. Rich text fields and updating posts when they are saved in Oxygen now work better, and revisions are no longer indexed.
  • Improved tax_query handling in fringe cases with multiple AND clauses joined together with OR.
  • Premium. It’s now possible to override global multisite search settings from the searchblogs query variable.
  • Searching without a search term works much better now, you get more posts in the results (default value is up to 500).

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

Adding extra boost for exact title matches

…can use this code to give a boost for exact matches in titles and post content: add_filter( ‘relevanssi_results’, ‘rlv_exact_boost’ ); function rlv_exact_boost( $results ) { $query = strtolower( get_search_query() ); foreach ( $results as $post_id => $weight ) { $post = relevanssi_get_post( $post_id ); // Boost cases where query appears…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……in the title if ( stristr( $post->post_title, $query ) !== false ) { $results[ $post_id ] = $weight * 100; } // Boost cases where query is exactly the title if ( strtolower( $post->post_title ) === $query ) { $results[ $post_id ] = $weight * 100; } // Boost query…

Flatsome

Posts and pages on the product search results The Flatsome theme, when combined with WooCommerce, has a product search results page that can also show posts and pages. That doesn’t work with Relevanssi out of the box, but fortunately can be made to work. The function that adds the functionality…‘page’, ‘s’ => get_search_query(), ‘relevanssi’ => true, ); $query = new WP_Query( $args ); $pages = array(); while ( $query->have_posts() ) { $query->the_post(); $wc_page = false; if ( ‘page’ === $post->post_type ) { foreach ( array( ‘shop’, ‘cart’, ‘checkout’, ‘view_order’, ‘terms’ ) as $wc_page_type ) { if ( $post->ID ===……wc_get_page_id( $wc_page_type ) ) { $wc_page = true; } } } if ( ! $wc_page ) { array_push( $pages, $post->ID ); } } do_action( ‘flatsome_products_page_loader’ ); if ( ! empty( $posts ) || ! empty( $pages ) ) { $list_type = get_theme_mod( ‘search_result_style’, ‘slider’ ); if ( ! empty( $posts…

WooCommerce 4.4 problems
Updating WooCommerce to version 4.4 breaks Relevanssi searches. After updating WooCommerce to version 4.4, Relevanssi searches no longer find results.…

Related Posts:

Comment Section:

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed