wpml: index translations | WordPress.org

[ad_1]

See Relevanssi searching settings: there’s a setting whether to restrict the search to the current language or not. That way you can get all languages in the results.

It’s also possible to index cross-language content for each post, but that will lead to duplicates in the results, so I don’t recommend that.

i’m aware of the search settings.
how do you index cross-language content for each post ?

You can use the relevanssi_content_to_index filter hook to add any content to the post as it’s being indexed. Add a filter function that finds the matching post in the other language, fetch all the content from that post you want to include and add it.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer