Nested each in shortcode
-
Hello,
I’m using shortcode display values from relationship field images, and I would like to display their relationship field as well. It semi-works, but values are duplicated.My code:
[each linked_car]
{@linked_car._img}
{@post_title}
[each linked_car.sub-color]
{@linked_car.sub-color._img}
{@post_title}
[/each]
[/each]"linker_car"
field is a relationship field (file/image/video) of my pod called “cars”"sub-color"
field is a relationship field (file/image/video) that extends Media content typeThe shortcode above works if there is only one value for
"linked_car"
. However, if I choose multiple values (images), all sub-color values are duplicated for eachlinked_car
entry. Using nested each without"linked_car"
part doesn’t show anything.Is there a way how to display
"sub-color"
values only for their correct and one"linked_car"
, and not for every entry?
- You must be logged in to reply to this topic.