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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

This topic contains 3 replies, has 2 voices.

Last updated by Prosenjit Barman 1 year, 1 month ago.

Assisted by: Prosenjit Barman.

Author Posts
May 14, 2024 at 6:21 pm #15626770

Fabrice

Hello,
we're having a problem displaying articles by category.
The site is in 2 languages, English (default language) and French.
The site has two categories, "Articles" and "News" in English and French.
In English, the category pages display the correct articles in each category. In French, however, all articles appear in each category.

hidden link
hidden link

Sincerely
Thank you

May 16, 2024 at 5:43 am #15632897

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand that the French categories are displaying posts from all categories. When I checked the French version of the "News" category, I found that the posts within this translated category are showing correctly.

However, when I checked the French version of the "Articles" category, I found that posts from the French "News" category are also appearing there.

It is possible that the category assignment for the French post has not been done correctly yet, which is why, Posts from the News category also showing in the Articles category.

Could you please open the French post and make sure that the category is assigned correctly? If so, please try the following and check if that helps in solving the issue.

- Please go to "WPML > Support > Troubleshooting"
- Click on the following buttons:
-- Synchronize posts taxonomies [Sellect 'Posts' from the Dropdown and then click the button]
-- Clear the cache in WPML
-- Assign translation status to duplicated content
-- Set language information
-- Fix post type assignment for translations
- Once the process is completed, clear the caches from your site and browser.
- Open the default post in the WordPress editor and make sure that the Category is assigned correctly.
- Make a small change in the default post and update the page. Afterward, update the translation.

Let me know if the information helps or if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

May 21, 2024 at 6:33 pm #15652374

Fabrice

Hello Prosenjit,
we still have the same problem despite your instructions.
We then deleted the category and created another one with a different name, but the problem persists.
Thank you
Fabrice

May 22, 2024 at 6:47 am #15653905

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello Fabrice,
Thank you for the update.

Since you've created an Archive template, please check to ensure that the template has been translated. As you are using a Block theme, refer to the guide below to understand the process.

- https://wpml.org/documentation/getting-started-guide/translating-content-created-using-gutenberg-editor/translating-sites-that-use-full-site-editing/#translating-the-site-editor-templates

However, if the issue persists, try switching to a default theme like Twenty Twenty-One. If the category archive starts displaying the posts correctly after switching, it indicates that the logic for displaying posts on the archive page might not be properly integrated within your current theme. In this case, you may need to review the theme code and use WPML hooks to filter the correct language content. The `wpml_object_id` hook may help in this case.

- https://wpml.org/wpml-hook/wpml_object_id/

Please let me know the update. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

The topic ‘[Closed] Problem displaying articles in category archive pages in second language’ is closed to new replies.