Skip Navigation

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

Problem:
The client is experiencing an issue where the header overlaps with the content on many translated pages, and the header does not inherit the style of the original page.

Solution:
First, we recommend checking the display conditions in the Elementor Header Footer Builder. If the conditions are set for specific pages in one language, they may not apply correctly to the translated pages. To fix this:
1. Go to Appearance > Elementor Header Footer Builder and filter for the translated language.
2. Open the translated templates and locate the "Display on:" section.
3. Remove the current conditions for the Spanish versions of the WooCommerce pages.
4. Search for and add the correct translations of those pages, then save the template.

Another solution involves translating the display conditions using the WPML Translation Editor:
1. Navigate to WPML > Settings > Custom Field Translation and set

ehf_target_include_locations

and

ehf_target_exclude_locations

to "Translate".
2. Edit and save the original template, then translate it using the WPML Translation Editor.
3. In the Translation Editor, translate the post IDs to match the IDs of the translated pages.
For assistance in finding post IDs in WordPress, refer to this guide.

We are also considering implementing a WPML Hook inside the "Elementor Header & Footer Builder" for automatic display condition adjustments in each language, which may require cooperation with the plugin author.

If these solutions do not seem relevant to your situation, please open a new support ticket with us for further assistance.

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 22 replies, has 2 voices.

Last updated by Andreas W. 1 year, 6 months ago.

Assisted by: Andreas W..

Author Posts
November 3, 2023 at 4:52 pm #14727453

mustafaS-13

On many translated pages, the header overlaps with the content.

And the header does not inherit the style of the original page

e.g

Original page:
hidden link

Translated page:
hidden link

November 3, 2023 at 8:23 pm #14728727

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

It appears that this issue is further linked to the Tripgo Theme for which I need you to install the theme in its latest available version on my sandbox (test site).

Please login to the following sandbox and try to recreate the issue here:
hidden link

Leave me a quick message on this ticket if you were able to recreate the issue or not and we will take further steps from there.

Best regards
Andreas

November 4, 2023 at 1:12 am #14729727

mustafaS-13

I wasn't able to recreate

November 4, 2023 at 2:09 am #14729735

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

On your site, your header template, which you create at Appearance > Elementor Header Footer Builder uses the display condition "Cart", "Checkout", and "My Account".

This condition seems to be looking for the wrong pages on the translated templates and this is why the header is not showing up on those translated pages.

I was now able to recreate this issue on the sandbox.

Workaround:

Go to Appearance > Elementor Header Footer Builder and filter for a different language.

Now, open the translated templates and look for the section "Display on:".

You should see that you are using the condition to display the template on the Spanish versions of the WooCommerce pages.

Delete those entries and now search for the translations of those pages, add them, and save the template.

This solved the issue on my test.

Adjusting the translations manually inside the WordPress Editor in this case might not be the best solution, but a workaround that solves the problem.

I will further escalate this issue to our compatibility team for further revision tomorrow and work in the meantime on a proper solution. This solution might require the cooperation of the plugin author, in order to make the plugin compatible with the WPML Translation Editor.

As soon I have a proper fix for the issue or feedback from our team I will be in contact.

Best regards
Andreas

November 4, 2023 at 2:23 am #14729737

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

I found a solution for translating the display conditions with the WPML Translation Editor.

At WPML > Settings > Custom Field Translation set the following fields to "Translate":

ehf_target_include_locations
ehf_target_exclude_locations

Now edit and save the original template and translate it with the WPML Translation Editor.

You will see new fields as seen on the attached screenshots.

Here you need to translate the post IDs.

This means, that if the Cart has in the original content the ID "58" then the plugin sends "post-58" to the WPML Translation Editor.

You will need to adjust this string with the ID of the translated cart page, in my case "post-63".

How to find out the ID of a post in WordPress?
hidden link

This still might not be the best solution, but it works on my test.

We could try to implement a WPML Hook inside "Elementor Header & Footer Builder" that will allow the display conditions to be automatically set in each language, but this will require an internal escalation of the issue and it will require the cooperation of the plugin author(s).

I will investigate further tomorrow and let you know if I find a better solution.

Best regards
Andreas

translate fields.png
November 4, 2023 at 5:21 pm #14731673

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

Kindly note that our compatibility team has already been running tests for "Elementor Header & Footer Builder" and we are about to declare 100% compatibility, only issue is the "Include on:" option for which we are trying to achieve the cooperation of the author.

The author is using a WPML compatibility class in their plugin that should handle the options for each language, which seems not to work as expected.

I have added your ticket to our internal thread and I am asking the compatibility team to have another look into it, in order to provide a working solution, but please take note that we are actually waiting on the author of the plugin in order to cooperate on this matter.

This means, that in order to make the plugin fully translatable with the WPML Translation Editor we do need the cooperation of the plugin author, as the necessary code will need to be part of their plugin.

As soon I receive feedback from our team I will be in contact again.

Best regards
Andreas

November 7, 2023 at 10:29 am #14745875

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

The compatibility team is asking me to inform you, that for now, you should follow the workaround that I provided here:

https://wpml.org/forums/topic/split-header-not-appearing-on-translated-wc-pages/#post-14729737

A better solution will be implemented by the author of the plugin and available sooner.

We hope for your understanding.

Best regards
Andreas

November 29, 2023 at 6:25 am #14946391

mustafaS-13

the workaround is not working

November 29, 2023 at 11:51 am #14950127

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

Your cart page at the moment uses a header called "Header demas":

hidden link

It was created with "Elementor Header and Footer Builder" but if I check the backend, I can not find this header with post ID 5505.

Anyhow, this template is not showing up at Builder Header Footer > All HF and this might be why the translation is not working as expected.

I can not find any template with ID 5505 inside Templates > Saved Templates either.(Templates from Elementor PRO)

So, I edited this original template on Elementor and saved it again as a template in Elementor.

You will find the template now at Templates > All Templates with the ID 18027.

Further question here:

If I go to Templates > Theme Builder I do not find any Elementor display condition that allows to display of this template only on cart or checkout pages.

How are you controlling the display conditions?

Are all your pages supposed to use the same template? If so, then please take note that this is currently not the case.

Best regards
Andreas

November 30, 2023 at 5:33 am #14957829

mustafaS-13

Here it is in the screenshot.

You find it under appearance - elementor header and footer builder

[hfe_template id='5505']

Builder Header Footer is from another plugin

Screenshot 2023-11-30 062926.png
November 30, 2023 at 3:11 pm #14964439

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

Thank you!

Please complete the translation reviews and it should work.

See screenshot.

Best regards
Andreas

cart.jpg
November 30, 2023 at 4:56 pm #14965391

mustafaS-13

That's what I'm saying; it works for some pages but not other pages.

November 30, 2023 at 8:21 pm #14967417

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

I see, but this is not a big surprise in my opinion that there are conflicts, as you use many plugins that handle templates at the same time.

For example, you have Elementor PRO, which allows you to create templates for any content on your site. I do not understand why you use three or more different plugins to create the templates.

I can offer to take a copy to investigate this issue, but I would like to ask you first to run all available updates to confirm if the issue persists once all plugins are updated.

It would be ideal if you could provide a staging site for this test, but if not, then I will install the plugin "All In One WP Migration" to create a copy.

Please get back to me on this ticket once the plugins are updated.

Best regards
Andreas

December 1, 2023 at 4:45 am #14968477

mustafaS-13

I understand, Andreas.

But I was talking about the same translated pages using the same template made by 'elementor header and footer builder'

If you check this page hidden link, and filter it for all the languages, you'll see that some pages now have the header 'header demas' displaying correctly while some others do not. And I have surely implemented the workaround on all the translated pages)

December 1, 2023 at 5:22 am #14968601

mustafaS-13

And yes, all active plugins have been updated. You can proceed