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: The user would like to show translated categories in the filter of the Blog Masonry Grid for posts that are not translated and show original posts Solution: This cannot be resolved easily, the workaround remaining is duplicating posts to secondary language. Relevant Documentation: https://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-on-pages-in-secondary-languages/using-content-duplication/

This topic contains 33 replies, has 3 voices.

Last updated by rohanK 1 week, 6 days ago.

Assigned support staff: Jamal.

Author Posts
September 17, 2019 at 9:00 am #4586665

rohanK

Hello Team WPML,

We translated this page hidden link but the categories of the blog post masonry are not shown on translated versions, and if they are shown, it miss some categories:
hidden link
hidden link
hidden link

It is like the blog posts are not added automatically to translated categories of the main english category: cf picture enclosed.

How can we make sure it does automatically add the category in french, spanish and german to the post?

Thanks for your help

[Credentials moved to private message]

September 17, 2019 at 11:48 am #4588137

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Thank you for contacting WPML Support. I will be glad to help with this.

Please run the "Fix terms count" in WPML->Support->Troubleshooting->Cleanup. This would fix terms for catégories if there are any issues.

The category assignment should work automatically when you translate your posts as you have configured WPML to do so in WPML->Settings->Posts and pages synchronization->Copy taxonomy to translations.

Maybe this is not an issue related to category assignment, and is caused by the translation of the Visual Composer module that holds the slider!
Can you open the translations(exp: French) in WP Bakery and check if the module's settings is the same between languages?
Please explain, how you created the module and maybe attach a screenshot of the settings that makes the categories appear?

Best regards,
Jamal
WPML Support

September 17, 2019 at 12:47 pm #4588523

rohanK

Hello Jamal,

thanks for your incredible support I am going to try this solution and let you know today,

Kind regards,

Sophie

September 17, 2019 at 3:03 pm #4589559

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you Sophie,

I'll set the ticket as waiting for customer feedback until you replied.

Best regards,
Jamal

September 17, 2019 at 9:26 pm #4591085

rohanK

Hello Jamal,

Thanks for our help again, I tried you first solution, without any success.

The module settings are the same in fourth languages but on the translated pages, it is the french categories added instead of english in the blog masonry.

I know we use a fallback to show english posts on translated pages even if they have not been translated (as english and french should be insured but german and spanish will come later). But when I check the categories in other languages, no posts are register in, how to make sure the english posts are shown in the translated categories when they have not been translated? Maybe that could solve the issue?

Please find attached a picture of settings to have the categories appeared on blog posts.
To create the module:
1. Use WPbakery manager
2. Add a blog masonry
3. Select the categories
4. Enable category filter: show categories filter

Let me know if you need further explanation,

Thanks a million for your help,

Kind regards,

Sophie

September 18, 2019 at 3:09 pm #4597819

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi Sophie,

We cannot actually show English posts in French categories, even if the posts are configured to fallback to original if a translation is unavailable. Either we translate the categories and posts or we don't.
A workaround would be to duplicate the English posts in the other languages, that way it will be assigned to the translated categories.
https://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-on-pages-in-secondary-languages/using-content-duplication/

Regarding the blog masonry, It seems that WPML does not translate it correctly(translate categories). You can edit it manually and assign the translated categories.

We can also Escalate it to our compatibility team for further analysis, but we'll need to reproduce it in a clean install. Let me know if you want me to create a new installation to reproduce the issue.

Best regards,
Jamal

September 18, 2019 at 4:41 pm #4599125

rohanK

Hello Jamal,

But Andreas did a trick to enble us to have the blog post and pop up falling back on english version on translated page if the content has not been translated: https://wpml.org/forums/topic/split-blog-post-fallback-option-not-working-with-the7-wpbakery/

Is it not the goal of this trick?

The translated categories have already been assigned manually to the pages including blog masonry as an attempts to solve the issue. But did not work so I contacted you. Or do you mean I should add the french, spanish and german categories manually to the english blog posts?

Yes please we can escalate the issue to compatibility team then.

We can create a new installation, you have the 7 theme I believe and to create a blog masonry simply follow the steps I provided in my previous post.

Thanks a lot for your help,

Sophie

September 19, 2019 at 1:02 pm #4604957

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Sophie,

I am not sure if the trick suggested by Andreas can create the desired behavior. It is indeed worth trying. Otherwise, we can use Duplication, in that case, any translated category will hold duplicates(considered as translations), and Andreas's trick will "be guaranteed" to work.
If it does not, then It is a bug, and we should definitely reproduce it and escalate it.

Have you been able to try Andreas trick? Let me know and I'll try to reproduce the issue and escalate it.

Best regards,
Jamal

September 19, 2019 at 1:34 pm #4605397

rohanK

The trick suggested by Andreas is to set up already on the website, we implemented a few month ago already. And then his trick was to add translate the categories and add the categories translated to the translated page.

It is the same process I followed for the news page, but as I am using the blog masonry, the categories buttons should be managed by the element (while on the candidate pages I was using a tab and a blog element: hidden link).

Let's escalate then because it seems to be a bug, like the translated categories are not associated to the english blog posts.

To recreate the bug:
1. Add categories to the blog
2. translate them
3. Add an article (just in one language)
4. On an english page, add a blog masonry element including the english categories
5. Translate page
6. Go in translated page and add the blog category in the right languages in the blog masonry

When you visit the blog page in the CMS, you should see that the blog posts is available only in the english blog posts.

Waiting for your news,

Kind regards,

Sophie

September 19, 2019 at 3:25 pm #4606847

rohanK

Note that also, normally Andreas trick should enable to show the job ads that has for exemple the country categories "Germany" in the "Allemagne"/"Alemania" categories, but for now if I am on the german version of the Swiss website and I make search for the city "Berlin", no jobs are shown, even if there is a job ads based in Berlin available on the job manager: hidden link

Seems to be related to the same issue than the categories of the blog post.

Waiting for your news

September 19, 2019 at 3:27 pm #4606883

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi Sophie,

We would need also the Visual Composer that you have installed in your server.
The7 WPBakery Page Builder 6.0.5

And maybe we would also need other plugins such as:
- The7 Ultimate Addons for WPBakery Page Builder 3.19.0
- The7 Elements 2.1.6

Please use this URL to login to the test server: hidden link

Install the "The7 WPBakery Page Builder 6.0.5" and create a couple of posts and categories. Translate the categories and reproduce the issue on the News page that I have created.

If the Masonry module does not exist, install The7 Ultimate Addons for WPBakery Page Builder and The7 Elements, one of them should have it.

Best regards,
Jamal

September 19, 2019 at 3:33 pm #4606909

rohanK

Hello Jamal,

I am going to see what I can do because all the plug ins you discuss come with the 7 so I don't have them.

Regards

September 19, 2019 at 3:38 pm #4606941

rohanK

Hello Jamal,

I tried to add the plugins you missed but they normally come with the 7 template. I tried to add my licence but it is still not working. Can you maybe just make a copy of my website? Like that you will have everything, news page included with the error.

Kind Regards

September 19, 2019 at 3:55 pm #4607041

rohanK

Hello Jamal,

I tried several time and managed to add the plug ins eventually. Also created a category that I translated in french and you have now 3 blog posts with the category in english.

Let me know what is the next step?

Have you seen this reply from me:
Note that also, normally Andreas trick should enable to show the job ads that has for exemple the country categories "Germany" in the "Allemagne"/"Alemania" categories, but for now if I am on the german version of the Swiss website and I make search for the city "Berlin", no jobs are shown, even if there is a job ads based in Berlin available on the job manager: hidden link

I have the same issue with the sector field. Seems to be related to the same issue than the categories of the blog post. I create one job and I added the Germany (country) and Business Support (sector) categories for you to test.

Waiting for your news,

Kind regards,

Sophie

September 19, 2019 at 4:02 pm #4607089

rohanK

PS: to test issue with job search, here is the page where I set up the structure: hidden link. I let you make test.

Looking forward to hearing from you,

Sophie