Skip Navigation

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

Problem:
The client is trying to translate their website to Indonesian and encountered issues on a specific page where the Indonesian language page does not display the courses as expected. The theme developer suggested that the issue might be related to WPML's handling of wp_query in different languages.
Solution:
The issue was resolved after clearing the site's cache in WP Rocket.

We can also provide a WPML test site for you to install the theme and replicate the issue to work on a solution. If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable 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. If further assistance is needed, please open a new support ticket 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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Andreas W. 1 year ago.

Assisted by: Andreas W..

Author Posts
May 30, 2024 at 4:17 pm #15689068

ssvnS

Background of the issue:
I am trying to translate my website to Indonesian and encountered issues on a specific page. The page in question is hidden link, where I expected to see the course page for logged-in users.

Symptoms:
The Indonesian language page does not display the courses as expected, unlike the English version at hidden link which works well. The theme developer indicated that the issue might be related to WPML's handling of wp_query in different languages.

Questions:
How can I set up the course layout correctly for each language using WPML to ensure it functions like the English version?
Is there a specific WPML configuration that needs to be adjusted to handle wp_query correctly for multiple languages?

May 30, 2024 at 5:38 pm #15689595

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

The theme developer will need to adjust its code to make it compatible with WPML.

I can offer a WPML test site on which you could install the theme and I will replicate the issue and work on a solution.

Would this be possible?

Best regards
Andreas

May 31, 2024 at 10:36 am #15691799

ssvnS

please let me know what kind of code the theme developer need to adjust ?
btw, could you please check why it works on English version but doesn't work on Indonesian version ?

May 31, 2024 at 2:39 pm #15692995

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I need to revise the theme's code to find a solution for the issue.

If the author calls get_posts() inside the theme's template, file he might need to add the query argument:

'suppress_filters'=> false

It further might be the case that maybe one of our hooks needs to be implemented, as I do not know which approach the developer is taking.

For example this hook:
https://wpml.org/documentation/support/debugging-theme-compatibility/#issue-wp_queryargs-or-get_postsargs-doesnt-filter-out-correct-posts-ids-for-the-current-language

I can offer a WPML test site on which you could install the theme and I will replicate the issue and work on a solution.

Would you be able to install the latest version of the theme on a test site which I will provide?

June 6, 2024 at 11:02 am #15710502

ssvnS

It's the problem of WP Rocket, the page loads as soon as I disabled it