Skip to content Skip to sidebar

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

Problem:
The client is experiencing an issue where the Author Gutenberg Block does not display the translated text in the secondary language on their WordPress site. Despite the correct setup in String Translation, the block shows the English text instead of French.
Solution:
1. Navigate to WPML → String Translation.
2. Click on the Translate texts in admin screens link at the bottom.
3. Search for user meta fields related to the author bio, such as 'description' or 'biography'. Select all relevant fields.
4. Click Apply to register these fields for translation.
5. If the issue persists, add the following code to your theme's functions.php file:

add_filter('get_the_author_user_description', function ($desc, $user_id, $field = 'user_description') {
    if (! $desc || ! class_exists('SitePress')) {
        return $desc;
    }
    if (empty($user_id)) {
        $user_id = get_queried_object_id() ?: get_current_user_id();
    }
    $context = 'Author Description';
    $name    = 'Author Description - User: ' . intval($user_id);
    do_action('wpml_register_single_string', $context, $name, $desc);
    $desc = apply_filters('wpml_translate_single_string', $desc, $context, $name);
    return $desc;
}, 10, 3);

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we recommend opening a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins.

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.

Tagged: 

This topic contains 10 replies, has 1 voice.

Last updated by Kor 6 days, 14 hours ago.

Assisted by: Kor.

Author Posts
September 30, 2025 at 6:58 pm

markM-15

Background of the issue:
I am trying to translate the Author Bio section on my WordPress site using WPML. The issue can be seen on this page: hidden link.

Symptoms:
The Author Gutenberg Block does not display the translated text in the secondary language. Instead of the French translation, the English text is shown.

Questions:
Why is the Author Gutenberg Block not displaying the translated text in the secondary language?
How can I ensure the Author Bio is correctly translated and displayed?

My string Translation is correct

October 1, 2025 at 1:50 pm #17449103

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I can replicate this on our sandbox site here hidden link

Login : hidden link

Please allow me to escalate this further to our 2nd Tier Support for further assistance.

October 1, 2025 at 2:14 pm #17449138

markM-15

Thanks.

Yes you can. 🙂

October 3, 2025 at 6:51 pm #17455226

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I have feedback and a workaround from our 2nd Tier Support.

Please backup and add the code below to your theme's functions.php:

add_filter('get_the_author_user_description', function ($desc, $user_id, $field = 'user_description') {
    if (! $desc || ! class_exists('SitePress')) {
        return $desc;
    }
    if (empty($user_id)) {
        $user_id = get_queried_object_id() ?: get_current_user_id();
    }
    $context = 'Author Description';
    $name    = 'Author Description - User: ' . intval($user_id);
    do_action('wpml_register_single_string', $context, $name, $desc);
    $desc = apply_filters('wpml_translate_single_string', $desc, $context, $name);
    return $desc;
}, 10, 3);

Then, recheck to see if it works.

October 15, 2025 at 4:00 pm #17487727

markM-15

Hello sorry for the delay.

I have added this code on my function php file and it dosen't work.

October 15, 2025 at 4:17 pm #17487778

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.

October 16, 2025 at 2:45 pm #17491048

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. I've completed the translation here in the string translation as shown in the attached screenshot and it works now. Could you check? hidden link

Screenshot_49.png
October 20, 2025 at 2:46 pm #17500057

markM-15

Ok it's good. It works on staging.

How do I fix this error on the production site?

October 20, 2025 at 3:30 pm #17500236

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. You need to apply the workaround listed here https://wpml.org/forums/topic/author-gutenberg-bloc-wont-display-secondary-langage/#post-17455226 . Then, search for the strings using the string translation and translate it.

October 20, 2025 at 6:18 pm #17500654

markM-15

Thank you, it works. 🙂

October 20, 2025 at 6:46 pm #17500795

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Glad that helped. Please mark this ticket as resolved.