[Waiting for user feedback] Custom post type an asigned taxonomies problem
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.
Our wait time is higher than usual, please make sure you are meeting the minimum requirement - https://wpml.org/home/minimum-requirements before you report issues, and if you can take a look at current Known Issues - https://wpml.org/known-issues/. Thank you.
Background of the issue:
I am using WP Job Manager which creates 3 custom post types (Job, Resume, and Company). I have set all of them as non-translatable, and I want to add some taxonomies (that are translatable and fully translated already) to these posts. The issue can be seen at hidden link. I expected that when a user submits a new resume, they can add a category to it, and the resumes can be filtered with this category in the search page, working in both languages with the filters shown in the correct language.
Symptoms:
Initially, it was working fine, but now when a new resume is submitted, it only adds the taxonomy term of the current language. When I change the language and edit the resume, I can manually add the translated taxonomy, but then it appears twice in the correct language on the single page.
Questions:
Why is the taxonomy term added only in the current language when a new resume is submitted?
How can I ensure that both the original and translated taxonomy terms are automatically added to the post, no matter the selected language?
How can I get on the single post, only the taxonomy terms of the current language and not the translated ones too?
I have set all of them as non-translatable, and I want to add some taxonomies (that are translatable and fully translated already) to these posts.
I am afraid what you are trying to do is not recommended and issues you have are expected.
You have a post type not translatable, but taxonomies do, so you are trying to assign 2 language taxonomies to 1 language post. What you have is expected issues; you can assign manually other translated taxonomies, but that will also show as it is assigned.
Best would be to either set both, post types to translatable so they can have translated taxonomies assigned, or set both post type and taxonomy as not translatable.
Thanks for the reply! I see the problem. I think that having both as non-translatable is the way to go.
Is there a way to translate only the term names on the string translation page and keep the same ID slug, etc? I have tried registering the strings with wpml_register_single_string, but the term names appear in so many places (plugins and themes), so it is impossible to go to each one of them and use wpml_translate_single_string to show the translated version.
Is there a better way to find the taxonomy terms in the string translation page, so that they appear automatically translated where they are supposed to?
what do you mean by term? Is this some taxonomy also added to this post types, if yes then it should be not translatable also.
In general, taxonomy translations are done via WPML > Taxonomy, or are automatically translated when the page it is assigned to, is automatically translated.
Let me know.
Regards,
Drazen
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.