Skip Navigation

[Resuelto] Show custom field images as clickable links

This support ticket is created hace 6 años. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Etiquetado: 

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Luo Yang hace 5 años, 12 meses.

Asistido por: Luo Yang.

Autor
Mensajes
#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:
enlace oculto

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/