Skip Navigation

[Resolved] Image Repeater Image Fields Popup

This support ticket is created 7 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 3 replies, has 2 voices.

Last updated by Beda 7 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#405638

I am trying to: have image repeater fields pop up large when clicked on.

I have tried this and several other similar shortcodes:

    <li style="list-style-type: none">
    [wpv-for-each field="wpcf-rental-pictures" separator=" "]
    <div class="col-xs-12 col-md-3 col-lg-2">
    <a href="[types field="rental-pictures" raw="true"][/types]" class="thickbox">[types field="rental-pictures"][/types]</a></div>
    [/wpv-for-each]

The above returns hidden link

#405731

The Thickbox must be supported by your theme:
https://codex.wordpress.org/Javascript_Reference/ThickBox

The ThickBox is then added via HTML to your Field.
If this is a repeating Field, you do use the For Each ShortCode of Views as you do already.

Please try this reviewed Code:

[wpv-for-each field="wpcf-rental-pictures"]
  <a class="thickbox" rel="gallery" href='[types field="rental-pictures" raw="true" link="false"][/types]'>[types field="rental-pictures" link="false" size="thumbnail"][/types]</a>
[/wpv-for-each]
#405862

Hello:

That did not do the trick. When clicked on the web browser reloads the page and the image does not popup....

#406599

This example works fine on my end, I used it repeatedly on Views.

Are you using this in another place than a View?

Are you sure, that your theme supports Thickbox as elaborated here?
https://codex.wordpress.org/Javascript_Reference/ThickBox

Also please try to edit the code I suggested with a tiny change.
Remove the rel=gallery and change the output from raw=true to output=raw.

See example below:

[wpv-for-each field="wpcf-images"]
  <a href="[types field='images' output='raw' link='false'][/types]" class="thickbox">[types field="images" link="false" size="thumbnail"][/types]</a>
[/wpv-for-each]
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.