To get started, we need to enable translations for the Search & Filter post type.
1) Enable translations
In the WordPress dashboard, under WPML head to:
Translation Management ->
Multilingual Content Setup ->
Then enable translations for Search & Filter:
2) Duplicate yourÂ Search Form for each language
Edit your Search Form in the primary language of yourÂ site.
Then on the edit screen duplicate the current Search Form for eachÂ language â this copies over the structure of your fields & settings in to the selected languages:
3) Translate manually
Edit a translation:
And select translate independently:
Note: Once this step is complete, your Search Forms are no longer synced â this means changing a setting, or adding a field in one language, will not automatically apply to the translations âÂ you must manually update each translation with your changes.
An additional step when using a shortcode to display results
This does not include when using a shortcode to display the Search Form itself
To display yourÂ Search Results on the correct page for each language, you must update the `Results URL` for each translationÂ and point it to the correct page â this includes the âlangâ query parameter (eg â
?lang=es) where applicable:
- Search & Filter automatically translates tag, category, and taxonomy IDs when creating duplicates in other languages.
- When displaying results using the Archive method, slugs can be defined individually for each language or share the same one