Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Supporter timezone: Europe/Zagreb (GMT+01:00)

This topic contains 5 replies, has 0 voices.

Last updated by Dražen 1 month ago.

Assisted by: Dražen.

Author Posts
December 10, 2024 at 7:05 am #16495956

gustavG-2

Background of the issue:
I'm using Relevanssi Ajax Search on our website hidden link. I added this code: function change_relevanssi_engine_to_wp_query() { return 'wp_query'; } add_filter( 'relevanssi_live_search_mode', 'gital_themechange_relevanssi_engine_to_wp_query' ); We are using WPML.

Symptoms:
When I search in Chrome from a Swedish page, the language defaults to English, but it works correctly in Firefox.

Questions:
What could be causing the language to default to English in Chrome when using Relevanssi Ajax Search with WPML?

December 10, 2024 at 9:12 am #16496534

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for contacting us.

1) What is the code that you are using to fetch posts?

Seems that query_posts()is not the correct function to use here. You should be using get_posts().

2) Does the issue happen when only WPML plugins are active with Relevanssi and when using WP default theme, so without any extra custom code or plugin? If needed you can use your custom template for search there, just keep it simple, since we can not debug custom solutions.

Let me know how it goes.

Regards,
Drazen

December 10, 2024 at 10:28 am #16497273

gustavG-2

Hi,

1. I'm using get_posts().

2. I have tried with another WP default theme, but I have the same problem in Chrome.

December 10, 2024 at 11:34 am #16497762

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks.

I created a minimal installation of WordPress, WPML, and all necessary WPML add-ons, and themes.

You can access the WordPress dashboard using the link below:

- hidden link

Try to replicate the issue with a simple example page, and please share step by step guide on what have you done.

This will help us to report the probable issue to the compatibility team and solve the possible problem faster.

Regards,

Drazen

December 18, 2024 at 2:08 pm #16526312

gustavG-2

Thank you!

I have now installed two plugins. Relevanssi and Relevanssi Ajax Search. I have put the search bar on this page: hidden link and it seems to work correctly there.

So I can't reproduce the problem on your site.

December 18, 2024 at 2:20 pm #16526344

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for checking and getting back.

It could be then something related to your environment or website.

If the issue still happens with only WPML plugins and Relevanssi, all others disabled, and using WP default theme, without additional custom code / cache and etc, please share access to the staging site so we can check further or provide us a copy of the website and we will check further.

- https://wpml.org/fr/faq/provide-supporters-copy-site/

Regards,
Drazen

The topic ‘[Closed] Help to organise the search function in Chrome’ is closed to new replies.