Strange behavior with “each” function and WPML
-
I am trying to show display taxonomies titles in a Pods list.
While my template looks something like this:
{@post_title}
{@custom-taxonomy}Thos custom taxonomies are displayed like Taxonomy1, Taxonomy2, and Taxonomy3. There are several topics regarding this issue. Unfortunately, we cannot adjust separators for custom taxonomies.
Suggested workaround (in this topic) is to use something like
[each custom-taxonomy]{@title} [/each]
and then we can try to add commas or semicolons wit css “after” attribute. But to my surprise this template gave me a title of random (i didn’t find any connection) custom taxonomy title. In case of three different taxonomies i see the result: randomtaxonomy7 randomtaxonomy7 randomtaxonomy7
I even tried
[each custom-taxonomy]{@term_id} [/each]
and that gave me7 7 7
. But for some custom taxonomies this approach worked fine. After comparing those taxonomies I found out that if custom taxonomy is marked “Translatable” in WPML multilingual plugin, I get this problem. Turning translation off, this each approach is working fine.So, what can be done? How to get rid of this “and” word before last taxonomy. All with comma’s would be fine, but “, and” before last taxonomy looks weird and grammatically unacceptable.
- You must be logged in to reply to this topic.