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 Raja Mohammed 8 months, 1 week ago.

Assigned support staff: Raja Mohammed.

Author Posts
February 6, 2019 at 8:16 am #3164464

sherryH-3

Hi there -

We have a custom code on a blog category here: hidden link We would like to only partially translate this but we're stuck on how to do it. For example, we want to translate the category name and description, but otherwise leave all the posts in that category as the English content (we don't want to duplicate all those as we don't have translations for them and we've actually custom coded it so that the post excerpts actually click through to full pages - not the posts, if that makes sense). How can we accomplish this?

Thanks,
Sherry

February 6, 2019 at 10:53 am #3165045

Raja Mohammed
Supporter

Languages: English (English )

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

Hi Sherry,

Welcome again 🙂

It seems you want to keep the posts untranslated and translate the categories alone. correct me if I'm wrong. If that is the case then probably the settings in WPML will help.

Please follow the steps:

- To display original language content for all posts belonging to specific post types, go to the WPML -> Settings page.

- Scroll down to the Post Types Translation section and select the second option, Translatable – use translation if available or fallback to the original language, for all post types you need.

- On the same page locate Taxonomy Translation and select the first option "Translatable - Only show translated content" for the appropriate taxonomy.

Documentation : https://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-on-pages-in-secondary-languages/

If this doesn't help, then kindly share the custom code snippet you are using to generate the content using http://pastebin.com

let me know the results.

Kind regards,
Raja

February 7, 2019 at 7:31 am #3168673

sherryH-3

Hi Raja,

It looks like I had already selected posts and pages under Post Type Translation as, "Translatable – use translation if available or fallback to the original language". Under Taxonomies Translation, Categories and Tags were marked as, "Translatable - only show translated items".

I think my confusion is when I am on the English (main) site, all of our categories are there. When I go to German, no categories except for "uncategorized" are set up. The custom template files we came up with, which you can see on the front end here: hidden link Has it's on sub navigation (a custom menu) and it's on sidebar with custom widgets. We have done the same thing with our main blog page: hidden link What we're wanting to do is only translate the category name, the custom menu, and the sidebar widgets on these templates but otherwise keep the posts that are displayed under these categories, as not translated. I can't figure out how to do that because there doesn't seem to be a way to duplicate blog categories like you do with the regular pages.

Based on following instructions I found here: https://wpml.org/documentation/getting-started-guide/translating-post-categories-and-custom-taxonomies/ However, that has messed up the English site so I'm trying to backstep to fix that. What has happened is that if you go to hidden link (the main News category) ... it forwards to hidden link (you can see what it's supposed to look like if you go on the test server: hidden link However, if you go to hidden link It actually shows the proper translation in German. I have no idea why it messed up my English category links though. I checked the English categories and the news slug is still "news". I also checked the English menu and the menu is still linked to the proper place. It simply decided to forward news to newsletter. Struggling to get that back 🙁

Sherry

February 7, 2019 at 7:56 am #3168757

sherryH-3

Hi again, Raja.

On a whim, I tried resaving permalinks and that has thankfully fixed the redirection issue! Whew. I think this one might be resolved as everything else I did seemed to have correctly done the categories in German.

Thanks for the initial help on this one.

Sherry

February 7, 2019 at 12:56 pm #3170296

Raja Mohammed
Supporter

Languages: English (English )

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

Hi Sherry,

Glad one of the issues is solved.

Please provide temporary access to your site, I will take a closer look at the issue. I have enabled the private fields for you to securely share the details. Also, let me know the current status since you are already trying different things it's better for me to understand where to look 🙂 .

If you have already provided credentials on another thread. Kindly reset or delete the access and create fresh access. Please note for Security purpose all the access should be temporary and to be deleted once the issue is solved .

Kind regards.
Raja

The topic ‘[Closed] Customized template utilizing WordPress Posts Functionality’ is closed to new replies.