Skip Navigation

[Resolved] Field type=”file”, would like to use an imageor the file title as frontend link

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to wrap their file output in an image so when the user clicks the image, they will have access to the file.

Solution:

This can be done by following the code below.
Image shortcode goes here

This support ticket is created 6 years, 3 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.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by MorganM3180 6 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#1112328
Screen Shot 2018-09-20 at 11.05.42 AM.png

Tell us what you are trying to do?

We have a list of suppliers that will each have an information page viewable on the front end. As part of the information available will be their 'Certifications' which will be downloadable as pdf's. The field allows multiple instances. I need each Certification link to be clickable either as an image or as the title of the certificate. I have used various codes suggested on your support to accomplish this, but I have not been able to make them work.

Can you send explicit instructions as to how to accomplish this?

The field name is: certifications

Is there any documentation that you are following? I followed a couple of support threads, but could not make them work.

Is there a similar example that we can see?

What is the link to your site?

hidden link

The image below shows how a sample page looks now, showing the file urls as the links.

#1112390

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Morgan,

Thank you for contacting our support forum.

You mentioned that you want to use an image as the link instead of just having the file link there correct?

Please let me know.
Thanks,
Shane

#1112392

Yes, I would like to either use an image or the file title.

#1112406

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Morgan,

The simplest way is to use an image file.

Will you be uploading an image file ? or just using a static file ?

This is one with an image field that you uploaded.

<a href="[types field='file' output='raw'][/types]">Image shortcode goes here </a>

Please let me know if this helps.

Thanks,
Shane

#1112422

My issue is resolved now. Thanks Shane. That makes total sense!