Skip Navigation

[Closed] add link to thumbnail image with types

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 9 years, 2 months ago. 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 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqas 9 years, 2 months ago.

Assisted by: Waqas.

Author
Posts
#284149

Using Types, I have created a custom field group with multiple image uploads.

I'm using

  <?php echo types_render_field("project-image", array("size"=>"thumbnail","align"=>"left")); ?>

To display the uploaded images on the page. How do I add a link to the fullsize image from each thumbnail?

#284310

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Please consider following code:

<a href="<?php echo types_render_field("project-image", array("size"=>"full", "url"=>true)); ?>">
	<?php echo types_render_field("project-image", array("size"=>"thumbnail", "align"=>"left")); ?>
</a>

Please notice the "url" attribute set to true, which returns URL rather than the HTML image markup. Please see https://toolset.com/documentation/functions/#image for more information.

The topic ‘[Closed] add link to thumbnail image with types’ is closed to new replies.