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.

Sun Mon Tue Wed Thu Fri Sat
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -
- 20:00 – 23:00 20:00 – 23:00 20:00 – 23:00 20:00 – 23:00 20:00 – 23:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

Tagged: 

This topic contains 23 replies, has 1 voice.

Last updated by Kor 3 months, 3 weeks ago.

Assisted by: Kor.

Author Posts
November 26, 2025 at 6:19 pm #17613038

Kor

Thanks for your patience. I will escalate the template issue to our 2nd Tier Support and I will come back to you once I've feedback.

December 4, 2025 at 12:58 pm #17634312

romanL-25

Any progress? It's been 8 days and nothing, and we're still stuck with the project 🙁

December 4, 2025 at 1:03 pm #17634366

Kor

Thanks for your patience. I do have some feedback, and this is what our 2nd Tier Support mentioned.

If you have a page with slug "sample-page" and you assign a template to that page - it will be a template with a slug page-sample-page slug.
So you translate "sample-page" and it becomes "translated-page" so you need to translate the template and make sure its slug is "page-translated-page" in order to work.

However, I've tested, and it's not working, and I'm rechecking this with our 2nd Tier Support and will come back to you as quickly as possible.

December 11, 2025 at 4:50 pm #17657064

Kor

Thanks for your patience. Our 2nd Tier Support has identified the issue and provided a workaround. Please create a full backup first, then add the custom PHP code below to your theme’s functions.php file. After that, make a small change to the primary language page and try retranslating it.

add_action( 'init', function(){

    remove_filter( 'pre_wp_unique_post_slug', 'wp_filter_wp_template_unique_post_slug', 10 );
});
December 16, 2025 at 5:50 pm #17668870
romanL-25

I confirm that the above PHP code resolved the issue, and now translated pages/posts are assigned to the correct templates 🙂 A few notes:

1. After implementing this code, re-translating the page/post didn't help. I had to remove the template translation and translate it again. This makes sense, as this PHP code removes the filter that ensures the uniqueness of the template slug. Now, in both languages, the template has the same slug, e.g., "page", "single-project" (previously in EN, it was "page-2", "single-project-2").

2. Do you plan to fix this issue in a future version of the plugin? I understand this problem is likely to occur to anyone building a template using "Full Site Editing."

3. The logo still didn't appear in the top menu on translated pages. I built it using the standard "Site Logo" block (see screenshot). I discovered that the image used in the logo needs to be translated using "WPML -> Media Translation." I'll leave it to you to decide whether this is a WPML bug. The same image inserted in the footer using the "Image" block doesn't require such a translation.

4. Could we please extend our plugin license by one month? We waited exactly that long for the bug to be fixed, which prevented us from launching the site.

New threads created by Kor and linked to this one are listed below:

https://wpml.org/forums/topic/logo-didnt-appear-in-the-top-menu-on-translated-pages/

site-logo.png
December 17, 2025 at 6:41 am #17669607

Kor

Thanks for your reply. I’ll address your questions below.

1. Did you apply the fix on your staging site? When I checked here
hidden link I didn’t see any duplicated templates. Could you please share a few screenshots showing the (template with the same slug) issue on your end?

2. I’ll check with our 2nd Tier Support regarding this and get back to you once I have more information.

3. I’ve split this into a separate ticket so we can follow up properly:
https://wpml.org/forums/topic/logo-didnt-appear-in-the-top-menu-on-translated-pages/

4. I’ll check with my support lead regarding the license extension request and update you once I have confirmation.

Screenshot 2025-12-17 at 1.41.18 PM.png
December 18, 2025 at 4:18 pm #17675683

romanL-25

1. We misunderstood each other 🙂 Everything works fine. You just wrote that after inserting the PHP code, I should do this:

"After that, make a small change to the primary language page and try retranslating it."

As I mentioned, it didn't work. The FSE template had to be removed and retranslated, not the page retranslated.

December 19, 2025 at 4:32 pm #17678632

Kor

Thanks for your reply. I’ve consulted with our 2nd Tier Support team and will get back to you regarding your question. As for the one-month extension, I’m still waiting for approval from my manager and will update you as soon as I receive feedback.

December 19, 2025 at 4:56 pm #17678698

Kor

Thanks for your reply. I have an update from our 2nd Tier Support team.

They confirmed that this can be resolved by making a small adjustment directly in the database using a tool such as Adminer or phpMyAdmin. We would locate the relevant template entries in the wp_posts table and identify the translated templates that have a -2 suffix in their name. By removing this suffix so the translated template matches the original name, the templates should be correctly recognized.

After this change, the templates should work as expected, and it should no longer be necessary to re-translate them.

As for the one-month extension, I will come back to you once I've feedback.

The topic ‘[Closed] FSE template not applied to tanslated pages/posts’ is closed to new replies.