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.

This topic contains 4 replies, has 2 voices.

Last updated by shaneB-8 3 months ago.

Assigned support staff: Marcos Vinicios Barreto.

Author Posts
July 16, 2021 at 2:27 pm #9217947

shaneB-8

Tell us what you are trying to do?

I have created several custom post types and it would appear as though the language switcher isn't appearing for the archives that exist.

Is there any documentation that you are following?

I came across this forum post and attempted to try what is detailed there but it still didn't resolve the issue for the one archive that I tested. Ref: https://wpml.org/forums/topic/language-switcher-not-working-for-archive-page/

Is there a similar example that we can see?

Yes the archive in question that I am testing is the following hidden link. The language switcher will appear in the top menu on the right but it does not exist.

July 16, 2021 at 2:39 pm #9218141

shaneB-8

Actually, I found one issue whereby I was not adding the menu items properly so now that I have done that most of the archives are working except the one that I posted above.

July 16, 2021 at 2:44 pm #9218179

shaneB-8

I just realized perhaps why but I'll still need to find a solution I think.

Basically, this content type is not translatable, but I would like the content in the archive (description above, etc) to be translated. Presently, that is working just fine. The problem I believe is that it is displaying no results and not linking to the English version. Is there a way to tell WPML to link the two or we have to build a page to deliver archive content in both languages across the two?

Thanks so much!

July 16, 2021 at 7:25 pm #9219189

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for contacting our support service. Please, let me explain some concepts:

1 - Your post type into question needs to be set as translatable, otherwise language switcher won't work for it as there's nothing to be viewed in the secondary languages.

See: https://wpml.org/documentation/getting-started-guide/translating-custom-posts/

2 - You need to have actually content that belongs to this post type existing in the secondary languages:

See:

https://wpml.org/faq/how-to-link-already-translated-pages/

https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/

Please, let me know if it helps to fix your issue, have a nice day.

July 19, 2021 at 1:53 pm #9230291

shaneB-8

Yes! I finally realized that I was being silly in thinking that the archive would just appear. The solution is to create a page and display a block of posts, which then shows in either language! Hooray!

Thanks for putting me on the right track 🙂