Cannot translate Custom header in X Pro when using Polylang

Hi there

It seems my support ticket from last friday has dissapeared?

So here once again my question:

I have used WPML in the past. But since WPML is not optimized for page speed at all, I am now working on my translations with a more lightweight plugin: Polylang.

With WPML custom headers in X Pro could be translated with this workaround:

You have to select all custom post types as translatable in WPML. This makes cs_header & cs_footer also translatable and when opening header customizer in X Pro you see the flags of your languages.

Now, with Polylang, I don’t see these flags and I am not sure how to enable translations for the custom headers I had to make to work with your theme (For instance if you want to show correct page titels for shop, blog etc you have to make a different header in X Pro because otherwise it is not supported).

So now my question: how can I translate my custom headers (& also custom footer) from Dutch to English?

Thanks in advance for your reply.

I hope this topic does not go missing again, like my previous topic. I really need the translations for my business webshop!!

Thanks in advance…

Hi @Woordenaar,

Thanks for writing in.

Would you mind providing your admin login credentials in a secure note? I tried on my end and I just created custom header for each language. But I like to test it in your setup.


Hi Rad

WOW! That would be GREAT :slight_smile:

I just added login info to the secure note.


Hi @Woordenaar,

I checked and it’s not currently possible (especially the latest one), it works on existing installation where translations are pre-made. I recommend using WPML on this one since the header uses post types which Polylang can’t reach. In WPML, it can be enabled easily through their settings (making all post types translatable).


Hi there @Rad

I currently have all my products & categories in my webshop and all my pages translated to English already via Polylang.

The only thing left to translate is header & footer (and then “shop” name, order form & some other small details)

I really don’t want to start over, and I don’t want to use bulky WPML which slows down website.

I don’t understand that you advertise X Pro with custom header builder as one of its main features but don’t provide a proper way of translating this header.

Is there no other solution than using WPML?

I saw that for WPML to work with your header translation you need to enable cs footer & cs header as being translatable. In the code it is marked enabled like this:

Just thinking out loud: can I not trick X Pro in showing the translation option for headers when I edit this code?

If this is possible, please let me know how I should do it.

Also a thought: if translation works on your end, then it should be possible to let it work on my end as well, right?

How can we achieve this?

If this needs custom development, no problem. I would even like to pay for it. As long as I can translate my site as soon as possible, since I’m losing revenue at the moment because translation gets postponed.

I hope you can still provie me with some sort of solution…

Thanks in advance. :slight_smile:

Or another possibility maybe…

Is custom header text saved to the .PO file of the current language?

If so, then I can translate PO file for header translation?

Like you explain here:

Would this maybe be a possibility?

I just need to change some text and the menu items on my header… Could not be so difficult, right?

Hi @Rad

I just received an update by Polylang support.

They say it is possible to allow translation for custom post types, also cs_header & cs_footer.

I added the support e-mail so others might also benefit from it.

This is what they said:

Polylang have a equivalent feature to active Custom Post Type translations.
See our documentation here

Read well the notes at the bottom of this documentation because only public CPT are displayed in the Polylang settings.

Otherwise as it is explained you can use au WPML compatibility feature with the wpml-config.xml file.


Could you guys help me explain on how to integrate this in X Pro & Polylang to translate custom headers please?

Today I have used “Migrate Polylang to WPML plugin” and started using WPML again.

But since page speed really slows down with WPML I would really prefer Polylang.

Your help is most welcome…

Thanks in advance!

Hi @Woordenaar,

Since it’s a custom header in which the content is supplied by your (as user) then it can’t be translated through *.PO (language files). Language files are only applicable for static strings added directly in the code and not for the strings stored in the database. Unless there is code that will translate what’s in the database which both WPML and Polylang doesn’t support.

And that post type option from Polylang is too limited, I’m only seeing few post types now from that setting. For now, it’s best to use WPML and maybe the performance issue you’re getting is due to your host. With or without WPML, your site loading speed is already slow. You may want to increase your site’s memory limit or CPU allocation (an upgraded host environment).


Thanks for the info @Rad

Site speed is only slow on the development website with WPML active. When Polylang was active load speed was much better.

On my live site page speed is MUCH faster.

WPML really slows things down…

So with X Pro not compatible with Polylang & not compatible with your custom header translation I am forced to use WPML, or use a different theme, but that would be even more work and postpone translation further, so further loss of revenue still… :slight_smile:

Host is not an issue. I have site memory limit to 256 MB or even 512MB. Also optimized site speed already, and using a WP Fastest Cache cacheing plugin.

On the WPML forum I already found some advice on disabling certain settings in WPML that could increase performance. Many people have speed issues with WPML…

If you would have some advice on getting WPML running faster, please let me know.

If not, I’ll find it. Anyway… Thanks for your support!!

Hi @Woordenaar

I can see on WPML forums that they suggest the following:

Disable or turn off the following settings:

  • Adjust IDs for multilingual functionality (WPML > Languages)
  • Track where strings appear (WPML > String translation)
  • Auto register strings(WPML > String translation)

And follow this guide:

So, perhaps that’s a good start!


Sorry, but I was busy the last days to optimize WPML & page speed on test version website and really not possible. Page speed is veeeeery slow no mather what…


I would definitely like to use Polylang, like my initial plan :slight_smile:

I was wondering since X Pro is not translatable with Polylang…

Is normal X Theme header compatible with Polylang?

With X theme could I make a header just like my header right now?

Hey @Woordenaar,

The Classic Header is part of the theme’s template system and that is translatable using the regular translation method which translation plugins can also access.


Using the this guide from Polylang, you can the enable cs_header post type.

But, because the cs_header & cs_footer post types could not be edited like a regular post or page, you don’t have a language switcher so you have no way of translating them.

Regretfully, you would need a third party developer to integrate Polylang. WPML is the one integrated in the theme and that integration was not simple. It required hours of development work. With that said, what I will do is post this as feature request so this might be taken into consideration in future product developments.

Thank you for understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.