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 thread is resolved. Here is a description of the problem and solution.

Problem:

Zeko theme - Front Page Panel is not showing the translated content on front-end

Solution:

1. Open this file with a code editor.
wp-content/themes/zeko/front-page.php

2. On line 39 replace this code:

$post = get_post( get_theme_mod( 'zeko_panel' . $panel ) );

With the following snippet:

if ( class_exists('SitePress') ) {
    $wpml_id = apply_filters( 'wpml_object_id', get_theme_mod( 'zeko_panel' . $panel ), 'page' );
    $post = get_post( $wpml_id );
} 
else {
    $post = get_post( get_theme_mod( 'zeko_panel' . $panel ) );
}

3. Save the file.

This will load the translated version of the page if it exists.

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by patrikP-5 4 weeks ago.

Assigned support staff: Itamar.

Author Posts
September 8, 2019 at 10:39 am

patrikP-5

I am trying to:

I am using Zeko theme, which is officially supported by WPML.
Zeko has a front page which can show up to 4 pages in 4 panels.
These are configured in WordPress Customizer.
Unfortunately translation doesn't work here.
Of course I want to show german pages on the german front page and english pages on the english front page.
When I set panel 1 to a specific page in German language, the panel is changed for English.
I provide credentials so you can test it yourself.

Link to a page where the issue can be seen: kidshelp-kambodscha.org

I had the same issue before: https://wpml.org/forums/topic/can-not-translate-wordpress-customizer-elements/#post-1397248

September 8, 2019 at 11:58 am
September 8, 2019 at 12:15 pm #4531409

patrikP-5

I set it up, it works fine on the demo

September 9, 2019 at 3:45 pm #4538725

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and thanks for trying my suggestions.

I've checked things on your site, and I can see that the issue is still there. I've also followed David's instructions, and it does not help to solve the problem. Please try the following.
I suspect that there is a collision with another plugin that might cause this problem. If possible, get your site into a minimum environment. Minimum environment, in your case, means deactivating all third party plugins and leaving only WPML and its add-ons active. Then please check if the problem persists. If it does not persist, so start by activating the plugins one by one and check when the problem comes back, then report to me which was the culprit plugin.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****


*** If your site is a live site you might want first to try those procedures in a staging environment or a snapshot of your site on your local server or another server. ***

Thanks,
Itamar.

September 9, 2019 at 6:31 pm #4539705

patrikP-5

Thanks for the suggestion, I deactivated all the plugins except WPML but it still persists.

September 10, 2019 at 11:29 am #4544645

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and thanks once again for trying my suggestions.

In this case, we are going to need to check the issue on our server. At the following link, you will find all the details on how to migrate your site to our test server. The process is quite easy.

Thanks,
Itamar.

September 10, 2019 at 11:34 am
September 13, 2019 at 1:18 pm #4568809

patrikP-5

The site is migrated now

September 15, 2019 at 7:12 pm #4575349

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Thanks for migrating your site to our test server.

I've checked things on the copy of your site but couldn't find a fix for this issue.
Therefore, I escalated this issue to our second tier supporters.

I'll keep you updated here for any news about this issue.

Thank you for your patience.
Itamar.

September 19, 2019 at 10:52 am #4603833

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Our compatibility found a fix for this issue. I've tried it, and it is working on the copy of your site on our server. Please see it here.
hidden link

Here is what you need to do.

1. Open this file with a code editor.
wp-content/themes/zeko/front-page.php

2. On line 39 replace this code:

$post = get_post( get_theme_mod( 'zeko_panel' . $panel ) );

With the following snippet:

if ( class_exists('SitePress') ) {
    $wpml_id = apply_filters( 'wpml_object_id', get_theme_mod( 'zeko_panel' . $panel ), 'page' );
    $post = get_post( $wpml_id );
} 
else {
    $post = get_post( get_theme_mod( 'zeko_panel' . $panel ) );
}

3. Save the file.

This will load the translated version of the page if it exists.

Can you please try it and see if it works on your site?

Thanks,
Itamar.

September 21, 2019 at 9:45 am #4615713

patrikP-5

My issue is resolved now. Thank you!