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.
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.
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
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.
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.