Skip Navigation

[Resolved] Show custom field images as clickable links

This support ticket is created 6 years 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
- 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)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 6 years ago.

Assisted by: Luo Yang.

Author
Posts
#1143624

I'm having an additional issue (somewhat unrelated), my images are in custom fields (no created by types). I need to make these images in my views clickable back to the post they are from. I treid the instructions here (https://toolset.com/forums/topic/making-images-clickable-to-a-website/) but it didn't work as it just displayed the code on the front end. I am using Divi Builder, I'm not sure if that is the cause of my problems or not. The section that I want to link back to the post url is:

<img class="aligncenter" src="{!{wpv-post-field name='imageUR'}!}">
#1143632
image2.JPG

Hi

There isn't the similar problem with a fresh wordpress installation + the latest version of Toolset plugins + DIVI theme 3.11.1.

Here are detail steps, please correct me if there is anything missing:
1) Create a post, with custom field(not created by Types plugin) "imageUR", field value is:
hidden link

2) In the post content display the shortcode like this:

{!{wpv-post-field name='imageUR'}!}

<img class="aligncenter" src="{!{wpv-post-field name='imageUR'}!}">

It works fine, see screenshot image2.JPG

Both the image URL and image display correctly.

#1143984

I think you misunderstood.

This section:

<a href="[wpv-post-url]"><img class="aligncenter" src="[wpv-post-field name='imageURL']"></a>

Is a custom field that has an image (url) in it that if someone clicks the image, I want them to be directed to the current post. But that doesn't work. I can already get the post name/url to work.

#1144817

I have tried below codes in my localhost, it works fine with DIVI theme 3.11.1:

<a href="{!{wpv-post-url}!}"><img class="aligncenter" src="{!{wpv-post-field name='imageUR'}!}"></a>

If the problem still persists in your website, please try these:
1) In case it is a compatibility problem, please deactivate other plugins, and switch to original parent DIVI theme, and test again

2) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/