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)
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.