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 thread is resolved. Here is a description of the problem and solution.

Problem: Author name not showing the translation on blog main page

Solution: User Name is translated using String Translation. But the translation is not showing in the frontend because of a compatibility issue. It worked after the following change in code.

From

<?php echo get_the_author_meta('user_firstname', $author_id) . ' ' . get_the_author_meta('user_lastname', $author_id); ?>

To

<?php the_author(); ?>

Relevant Documentation: https://wpml.org/forums/topic/author-name-not-translated-on-blog-main-page/#post-4499213

This topic contains 8 replies, has 2 voices.

Last updated by rotemY-2 1 month, 1 week ago.

Assigned support staff: Bigul.

Author Posts
August 29, 2019 at 1:51 pm #4481495

rotemY-2

I had an issue regarding translating the author name on the blog post (https://wpml.org/forums/topic/user-name-not-translated/). The issue was resolved but only on the pot page and not the blog main page

August 29, 2019 at 7:33 pm #4483185

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve these issues.

I would like to access the admin area of your site for further checking. Please fill the private details fields after a full site backup.

Please check the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

To help you faster, I've enabled debug information for this support ticket. Please see this link for how to get this information from your site and give it to us: http://wpml.org/faq/provide-debug-information-faster-support/

--
Thanks!

Bigul

August 30, 2019 at 7:57 am #4485165

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the login information. This may be happening because the theme is using *get_the_author_meta* function in *archive.php* file. Please check the attached images.

Please make the following changes(at line no:15) in *archive.php* after a site backup and check you are getting the expected result or not.

From

<?php echo get_the_author_meta('user_firstname', $author_id) . ' ' . get_the_author_meta('user_lastname', $author_id); ?>

To

<?php the_author(); ?>

--
Thanks!

Bigul

August 30, 2019 at 12:07 pm #4486987

rotemY-2

Hi Bigul,
I did the change -but the result is the same

August 30, 2019 at 6:26 pm #4488887

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the feedback. Please allow me to make a duplicator copy of your site using the Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server.

--
Thanks!

Bigul

August 31, 2019 at 4:01 pm #4491255

rotemY-2

Done.
Thanks!

September 2, 2019 at 6:19 am #4494653

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for your permission. I made a Duplicator copy of the site now. Will debug it further and get back to you soon. Please wait.

--
Thanks!

Bigul

September 2, 2019 at 4:41 pm #4499213

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Please make the following changes(at line no:16) in *index.php* after a site backup and check you are getting the expected result or not. It works as expected in my local copy now. Please check the attached images.

From

<?php echo get_the_author_meta('user_firstname', $author_id) . ' ' . get_the_author_meta('user_lastname', $author_id); ?>

To

<?php the_author(); ?>

--
Thanks!

Bigul

September 7, 2019 at 7:52 pm #4529815

rotemY-2

My issue is resolved now. Thank you!