Skip to main contentSkip to footer

Version 3.3.1 for the free Relevanssi is out now. It fixes a MySQL injection vulnerability, adds new features, removes the cache and improves the way excerpts and highlights work. Indexing should be faster as well.

  • Improvements to excerpts: excerpts with phrases work much better now, and the excerpt creation logic has been improved: the excerpts are now better. The process takes a bit more time, though.
  • Allowing HTML tags in excerpts could lead to those tags being left open. Relevanssi will now try to close open HTML tags in excerpts.
  • Allowed tags were not controlled in comments. They are now.
  • Highlighting in documents didn’t always work; it should be more reliable now.
  • Non-integer values are removed from post__in and post__not_in before processing them.
  • Query variables p and page_id are now supported.
  • Relevanssi now understands date_query variables as well.
  • The original post excerpt is stored in $post->original_excerpt.
  • Taxonomy search works better with term id parameters (for example from wp_category_dropdown).
  • Errors about $wpdb->prepare() missing an argument removed.
  • New functions: relevanssi_the_title() and relevanssi_get_the_title() can be used to display highlighted titles in search results.
  • The old title highlighting method has been disabled, because it caused highlights in wrong places. Now the highlighted title is stored in $post->highlighted_post_title, take it from there or use the Relevanssi title functions to display it.
  • Polylang and WPML support was adjusted to perform better in edge cases.
  • Indexing is faster, thanks to some improved code from Tom Novelli.
  • MySQL injection attack vulnerability removed.
  • The cache feature is now removed. Relevanssi should automatically drop the cache tables.
  • New filter: relevanssi_indexing_data lets you modify the data before it’s indexed.

Your account

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

Search

Popular Resources

Ajax Load More
Ajax Load More is an infinite scrolling plugin for WordPress. It has a Relevanssi extension, but with the current versions…
Excluding old content from the search

…* Adds a date filter to the search query. * * @param WP_Query $query The query object. * * @return WP_Query The modified query object. */ function rlv_date_filter( $query ) { $date_query = array( ‘after’ => ‘January 1st, 2016’, ‘inclusive’ => true, ); $query->set( ‘date_query’, $date_query ); return $query; }……) { global $wpdb; $restriction[‘mysql’] .= ” AND YEAR(post.post_date) >= 2016 “; $restriction[‘reason’] .= ‘ Post too old’; return $restriction; } Note that the restriction explains which posts are included in the index, so that’s why the year is >= 2016 and not < 2016. To deindex posts from the……$restriction[‘reason’] .= ‘ News post too old’; return $restriction; } If, on the other hand, you only want to apply this filter in searching, you can use the WP_Query date parameters like this: add_filter( ‘relevanssi_modify_wp_query’, ‘rlv_date_filter’ ); /** * Adds a date filter to the search query. * * @param…

Riode
Riode is a WooCommerce theme from ThemeForest. It has a built-in live search that does not automatically use Relevanssi. However,…

Related Posts:

Comment Section:

3 Comments. Leave new

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