Skip Navigation

[Résolu] lightbox on image in repeating field

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.

Marqué : 

This topic contains 4 réponses, has 2 voix.

Last updated by Dido Il y a 6 mois et 1 semaine.

Assigned support staff: Shane.

Auteur
Publications
#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: Anglais (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: Anglais (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!