Skip Navigation

[Gelöst] Image repeater fields in a template

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created vor 10 Jahre, 5 Monate. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 Antworten, has 2 Stimmen.

Last updated by mikemike vor 10 Jahre, 4 Monate.

Assisted by: Luo Yang.

Author
Artikel
#156208

Hi,

I can't seem to find an solution to this anywhere.

Basically I have an image repeater field called "photo" and I need to display thumbnails of each photo on a page. I don't want to use shortcodes in the WYSWYG editor so I need to code it into my template.

My template just needs to output each image in a list in this format:

<li><a href="path-to-full-size-image" rel="prettyPhoto"><img src="path-to-thumbnail" /></a></li>

The path-to-full-size-image would obliviously be the original image that was uploaded, and the path-to-thumbnail would be the small image that also gets created by wordpress when an image is uploaded.

__________________________________________________________________________________________

Additional Information

FYI I've used...

add_image_size( 'Small', 150, 150, $crop = true );

...in my functions file for the thumbnail. So the path-to-thumbnail will need to use the 'Small' image, which can be easily echoed out with:

echo types_render_field("photo", array("raw"=>"false", "size"=>"Small"));

Thanks in advance.

#156271
#157087

Thanks Luoy. Perfect.

Das Forum „Types Community Support“ ist für neue Themen und Antworten geschlossen.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.