Skip to content Skip to sidebar

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 1 reply, has 0 voices.

Last updated by guyt-2 5 days, 6 hours ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
September 17, 2025 at 7:33 am #17408259

guyt-2

Background of the issue:
I am trying to find the easiest way to translate parts of the website that are not pages or posts, such as headers and footers. I am using my own coded custom theme. Initially, I wanted to use widgets on the footer to display the footer content, but the widgets are impossible to translate. They are translated only from the string translation and require using code to do that. I tried adding a new pattern to see if it would be easier to translate, but it is also not translatable.

Symptoms:
Translating widgets and patterns is impossible using the current methods.

Questions:
What is the best approach to translate non-page/post elements like headers and footers using WPML?
Is there a way to translate widgets without using code?
How can I make patterns translatable?

September 17, 2025 at 9:58 am #17408750

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hi there,

Thank you for reaching out and for providing the details of your setup.

Since you're using a custom-coded theme, translating elements like widgets, headers, and footers—especially when handled outside of standard WordPress content types—does indeed require specific integration work. WPML, like any localization plugin, relies on language information being properly registered in the code. This is essential for making such elements translatable.

Please note that custom code falls outside the scope of our support. While we’re unable to directly review or debug your theme code, we provide comprehensive documentation to help developers make their themes and plugins WPML-compatible:

Achieving WPML Compatibility for Your Themes and Plugins:
https://wpml.org/documentation/support/achieving-wpml-compatibility-for-your-themes-and-plugins/

WPML Hooks Reference
https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/

WPML Coding API
https://wpml.org/documentation/support/wpml-coding-api/

We recommend reviewing these resources to learn how to register your custom elements and patterns correctly so they can be picked up by WPML’s translation tools.

Best regards,
Lucas

September 17, 2025 at 10:50 am #17409082

guyt-2

Thank you Lucas, so i tried it this way:

1. I created a template part on the theme code
2. Added the needed content to the template part on the design area on the WP when i am on the default language.
3. Changed the language to the translated lang
4. Went to the template part area on the admin design and added the needed content there

it worked for me this way.
Now i am able to translate the template part visually for each language on the design area on admin.