Hi,
How could I link elements for multiple value fields separated by comma? For example, this code shows all images:
[types field='imagegallery' separator=', '][/types]
Then, how could I link every image to the correct thumbnail?
I only can fix it using index parameter, but then it is limitating number of images. For example:
[types field='imagegallery' separator=', ' index='1'][/types]
[types field='imagegallery' separator=', ' index='2'][/types]
etc .
Thank you!
I solved this problem with the gallery using this tip:
https://toolset.com/forums/topic/wp-for-each-for-image-gallery-returning-all-url-not-each/
But I have same doubt for other fields. For example, I have 2 multiple value fields separated by comma:
- Link
- Link title
I want to do this, but without using "index". Is there any way to link every title to the link?
[types field='link_title' separator=', ' index='1'][/types]
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
No, either you should go with [wpv-for-each] or there is another way that you should create a repeating field group where the repeating field group will hold the link and link title fields.
Here is the info how you can create repeating field group:
- https://toolset.com/course-lesson/creating-and-displaying-repeatable-field-groups/#creating-repeatable-field-groups
Here is the info about how you can display the repeating field group:
- https://toolset.com/course-lesson/creating-and-displaying-repeatable-field-groups/#displaying-repeatable-field-groups
My issue is resolved now. Thank you!