Hello,
I want to add a link on my repeating images. But how?
I read this article, but this will not suit me in Avada.
https://toolset.com/documentation/customizing-sites-using-php/displaying-repeating-fields-one-kind/
Hope you can help me with this.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Dido,
Thank you for getting in touch.
You can actually use the following method below to display you repeatable image fields.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-for-each
You can output the raw image URL and reconstruct the anchor tags with an image tag as well. Example
[wpv-for-each field="my-field"]
<a href="someurl or shortcode with url"><img src="[wpv-post-field name='my-field' output='raw']" /></a>
[/wpv-for-each]
Please let me know if this helps.
Thanks,
Shane
Hi Shane,
I don't get it.. I use this code for the output of my images
<div>[types field='foto' title='%%TITLE%%' alt='%%ALT%%' align='none' size='custom' width='86px' height='86px' resize='crop' separator='
'][/types]</div>
How can I achieve what I need?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Dido,
Here is the correction.
[wpv-for-each field="foto"]
<a href="[types field='foto' output='raw'][/types]"><img src="[types field='foto' title='%%TITLE%%' alt='%%ALT%%' align='none' size='custom' width='86px' height='86px' resize='crop' separator='
' output='raw'][/types]" /></a>
[/wpv-for-each]
With the code above you should have the basic skeleton to achieve your goal.
Please let me know if this helps.
Thanks,
Shane
My issue is resolved now. Thank you!