Skip Navigation

[Resolved] lightbox on image in repeating field

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by Dido 3 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1909755

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.

#1909833

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

#1910411

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?

#1910771

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

#1910905

My issue is resolved now. Thank you!