Skip Navigation

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 3 replies, has 0 voices.

Last updated by justinb-4 3 days, 23 hours ago.

Assisted by: Andreas W..

Author Posts
June 28, 2025 at 1:10 pm #17179366

justinb-4

Background of the issue:
I am trying to display the translated content of our custom post types using a custom template within our custom block theme. However, the translated content is being displayed using the default single post template instead. We have explained the issue in detail in the video linked here: hidden link. The issue can be seen on this page: hidden link.

Symptoms:
The translated version of custom post types is displayed using the default single post template instead of the intended custom template.

Questions:
Why is the translated content using the default single post template instead of the custom template?
How can we ensure the custom template is used for translated content?

June 29, 2025 at 1:00 am #17179796

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

The Site Templates and Templates Parts of your Block Theme are available for translation at WPML > Translation Management > Dashboard.

Have you already translated those templates?

Note:
You might run into display condition issues with templates if you try to edit templates inside the Site Editor in a second language. In such case, you need to apply the workaround found in the following errata:

https://wpml.org/errata/template-is-not-applied-to-translated-page/

Best regards
Andreas

June 30, 2025 at 6:47 am #17181355

justinb-4

Hi,

We haven’t yet translated the templates or template parts associated with our custom post types, and we’re seeking clarification on the correct process.

Do we need to translate the custom post type templates before translating the custom post type content?

We reviewed the documentation you provided, but it’s still unclear whether template translation is a required step. To test this, we translated the template for our resource custom post type into German and then checked the translated content. However, the German content is still displaying using the default single post template instead of the custom single-resource template. As a result, we’ve removed the translated template for now.

A few key points for context:
1) We have custom templates for each custom post type.
2) The template for resource works fine in the default language (English).
3) We’re unsure whether enabling slug translations for custom post types is necessary to resolve this issue.

Could you please guide us through the correct steps to ensure that translated content for custom post types loads with the correct custom template on the frontend?

Thank you in advance for your support.

July 1, 2025 at 10:37 am #17187942

Andreas W.
WPML Supporter since 12/2018

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

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

You need to translate any templates or template parts to achieve the same layout and design in different languages.

Go to WPML > Translation Management > Dashboard and create a job for each template or template part.

Then access the translations at WPML > Translations and complete them to 100% using the WPML Translation Editor or automatic translation.

July 4, 2025 at 6:55 am #17199952

justinb-4

Hi,

The issue is solved now by translating the templates. Thanks for your support.