Skip to main contentSkip to footer

Different translation plugins use different methods for storing the translations, and these methods have varying compatibility with how Relevanssi works with the posts.

Best compatibility

  • Polylang. Relevanssi has good built-in support for Polylang. This is the best translation tool that causes the least trouble.
  • WPML. Good built-in support, almost as good as Polylang. WPML is more prone to causing weird edge case problems.
  • MultilingualPress. Uses separate multisite sites for each language. This works well with Relevanssi, making language filtering automatic. With Relevanssi Premium, you can do multisite searching to include posts in different languages.

Not compatible

  • TranslatePress. The translated strings are stored in a separate database, and are invisible for Relevanssi. It is possible to make Relevanssi index the translated strings, but then Relevanssi has no way to index different languages separately. You can’t restrict the search to a specific language; all languages are mixed together.
  • GTranslate. The translations are not stored locally at your site, so Relevanssi can’t access them.

Your account

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

Search

Popular Resources

Adding a search form in the navigation menu

…the SearchWP Modal Search Form. As the name says, the plugin is from the SearchWP developer Jon Christopher, but it also works great with Relevanssi. This plugin can easily add a search feature to your navigation menu or a site header. The search form also works great on mobile devices….…header. That’s a good reference if you want to build a nice search form in the header. If your theme does not include a built-in search form and you’re not interested in building one yourself, one of the best plugin options is the SearchWP Modal Search Form. As the name…WordPress doesn’t make adding a search form in the navigation menu easy. It’s a popular request, though, and having access to the search in the site header is typical. Relevanssi itself doesn’t have opinions on the user interface. Some themes, like Twenty Twenty, include a built-in search feature in the…

Indexing the post ID
Are post ID’s searchable in Relevanssi? No. Relevanssi does understand the WP_Query p parameter to restrict the search by post…
Blocking pre and code tags

…$content = preg_replace( ‘#<pre.*?</pre>#mis’, ”, $content ); $content = preg_replace( ‘#<code.*?</code>#mis’, ”, $content ); return $content; } This will find all <pre> and <code> tags in posts and replace them and their contents with nothing, both when indexing and when building excerpts. This will immediately take effect for excerpts, and…If your posts have lots of programming code examples in <pre> and <code> tags, those might look pretty bad in the search results. A snippet of programming code isn’t usually a good excerpt, and if you use those tags purely for code snippets, they won’t likely contain significant search content,……either. Fortunately it’s easy to completely remove all <pre> and <code> tags and their content both in indexing and excerpt-building. All you need to do is to add the following code to your theme functions.php: add_filter( ‘relevanssi_post_content’, ‘rlv_pre_code’, 10 ); add_filter( ‘relevanssi_excerpt_content’, ‘rlv_pre_code’, 10 ); function rlv_pre_code( $content ) {…

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