Skip Navigation

[Resolved] Add thumbnail pictures with downloadable external PDF link from external source

This support ticket is created 4 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 4 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#1440753
Download PDF pijp product sheet download.png
Download PDF pijl safety sheet download.png

How do i add thumbnail pictures to my individual product pages without them showing up in all (sgl page template product pages).
I want per sgl product page 2 pdf downloads for a product sheet and safety sheet (links attached to the thumbnail pictures)

#1441445

Hello, you could use two custom "file" fields applied to the Product post type to store the downloadable files for each post. In the Product template, you can use conditional HTML to display these linked images only on those posts which have content stored in the respective file fields. We have more information about conditionals here: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
We have more information about using Types field shortcodes for "file" fields here: https://toolset.com/documentation/customizing-sites-using-php/functions/#file
Click "+More" to see code examples and more customization information...but there is currently a display issue on that document so square shortcode brackets are showing up as double curly braces:

[types field="the-field-slug"][/types]
[php]

[php]
{{types field="the-field-slug"}}{{/types}}

The square bracket syntax is correct.

If you're using the classic editor to design your Content Template for Products, you can use this code example to create a conditional that displays a link to the downloadable product sheet file:

[wpv-conditional if="( $(wpcf-fieldslug) ne '' )"]
  <a href="[types field='fieldslug' output='raw'][/types]"><img src="<em><u>hidden link</u></em>" /></a>
[/wpv-conditional]

Replace fieldslug with the slug of your Product Sheet custom field (both places - the code is used twice in this example and both must be replaced), and replace https://yoursite.com/path/to/thumbnail.png with the full URL of the thumbnail image for Product Sheet downloads. You can store those two PNG thumbnails in your Media Library and find the full URLs for each image there.

If you have trouble implementing this approach let me know and I can offer some more guidance.