Skip to main contentSkip to footer

Another quick bug fix release for Relevanssi free.

  • Fixed a bug that causes problems when paging search results.
  • Taxonomy term restrictions didn’t work most of the time.
  • the_content filters didn’t run on excerpts.
  • Style data and other extra elements created by short codes are now stripped.

Next beta of Relevanssi Premium is coming soon, I’ve just been very busy with other projects.

Your account

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

Search

Popular Resources

Indexing product codes with and without spaces

A Relevanssi Premium customer had a problem with product codes. The codes are in the format “ABC 100”, a group of letters and digits with a space in between. Users may search for the codes without the space, so the post should be found with “ABC 100” or “ABC100”. The……is relatively straightforward and uses the relevanssi_post_content and relevanssi_post_title_before_tokenize filter hooks: add_filter( ‘relevanssi_post_content’, ‘rlv_product_codes’ ); add_filter( ‘relevanssi_post_title_before_tokenize’, ‘rlv_product_codes’ ); /** * Index product codes in the format “ABC 123” ie. group of letters, * a space, group of digits both ways, with or without the space, so * that the……product codes don’t appear in a specific custom field but in the post titles and content. Thus the solution is to check both of those, and whenever something is found that matches the product code pattern, that string is indexed as is, but also with the space removed. The code…

Indexing image alt texts

Relevanssi by default ignores image alt texts (and other tag attributes). That’s often the right thing to do because alt texts aren’t visible to users. Finding a post with a search term that only appears in an alt text may confuse a user. If your alt texts are well crafted,……they may help search. It’s not hard to make Relevanssi index the alt texts. Add this function to your site: add_filter( ‘relevanssi_post_content’, ‘rlv_index_alt_text’ ); function rlv_index_alt_text( $content ) { $content = preg_replace( ‘/<img .*?alt=”(.*?)”.*?>/is’, ‘ \1 ‘, $content ); return $content; } This function uses the relevanssi_post_content filter hook, which……processes all post content before Relevanssi indexes it. All the HTML tags are still in the content – Relevanssi removes them later – so it is easy to make changes. It is easy for this function to find all IMG tags with an alt attribute and replace the whole tag…

Gmedia photo gallery tags
Gmedia photo gallery gives a false impression of working with Relevanssi, as you can see the gmedia_tag taxonomy appear in…

Related Posts:

Currently there are no related posts available.

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