Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are experiencing issues with translating search results for products on your website. When you search for a product and translate the search results, it redirects to another page instead of translating the products on the current page.
Solution:
We recommend the following steps to resolve this issue:
1. Navigate to WPML > Languages > Preserve URL arguments in your WordPress admin panel.
2. Add the parameters

s, post_type

to the Preserve URL arguments field. This action ensures that these parameters are retained during URL switches, which helps in maintaining the correct page during translations. For more details, please visit Preserve URL arguments documentation.
3. If additional parameters appear in searches (e.g.,

post_type

from WooCommerce), add these parameters to the same field to ensure proper functionality.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Additionally, you can open a new support ticket for further assistance at WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 0 replies, has 0 voices.

Last updated by Bruno Kos 1 week ago.

Assisted by: Bruno Kos.

Author Posts
November 27, 2024 at 11:28 am #16448790

erwinV-21

Background of the issue:
I am trying to translate search results for products on my website. When I search for a product and translate the search results, it switches to another page in the shop. Here is a video demonstrating the issue: hidden link. The issue can be seen on this page: hidden link.

Symptoms:
The search results do not translate as expected. Instead of translating every product in the search result, it switches to another page.

Questions:
Why are the search results not translating as expected?
How can I ensure that the search results translate correctly without switching pages?

November 28, 2024 at 6:38 am #16452529

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

Can you please try the following:

1. Go to **WPML > Languages > Preserve URL arguments** section in your WordPress admin panel.

2. Add the parameters `s, post_type` to the **Preserve URL arguments** field. This ensures that these parameters are retained during URL switches. For more details, refer to the https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/preserve-url-arguments-when-switching-languages/

3. If additional parameters appear in searches (e.g., `post_type` from WooCommerce), you can also add these parameters to the same field in the **Preserve URL arguments** section to ensure proper functionality.

Let me know if further assistance is required.

November 28, 2024 at 9:03 am #16453669

erwinV-21

Hi can someone give me help with this?

November 28, 2024 at 1:26 pm #16455319

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

Did you see my previous message? Let me know what is not clear related to these parameters.

I applied it on hidden link and it works now.

add parameters here.jpg
November 29, 2024 at 9:15 am #16458271

erwinV-21

Hi sorry i did not read your response. It works for the english version, but when you change to another language it doesnt show any products

November 29, 2024 at 11:01 am #16458948

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

It shows products in another language only if there are the products with that name in these languages.

Try searching for some product for which the title is the same in several languages.

December 4, 2024 at 11:47 am #16476338

erwinV-21

Is there a way to let WPML not translated every product title? that would fix the issue i think

December 4, 2024 at 12:45 pm #16476649

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

It is not possible, but when translating it, you can copy-paste the title in the translation editor to keep it the same.