Saltar navegación

[Cerrado] Issue with field phone

This support ticket is created hace 4 años, 1 mes. 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
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)

Este tema contiene 9 respuestas, tiene 2 mensajes.

Última actualización por Christian Cox hace 4 años, 1 mes.

Asistido por: Christian Cox.

Autor
Mensajes
#1874251

Hi!

I have a custom type with a field phone. This is the code, but... it´s not working to click and go to telephone call.

Could you help me?

Thanks

<p>[wpv-for-each field="wpcf-telefono_comercio"]
  <a href="tel:[types field='phone' output='raw'][/types]"> [types field='telefono_comercio'][/types]</a>
  [/wpv-for-each]</p>
#1874937
Screen Shot 2020-12-13 at 1.25.21 PM.png

It looks like the slug phone in the link href attribute is incorrect. It should be replaced with the correct slug, telefono_comercio. See the attachment here. The 3 red highlighted text slugs should be identical, otherwise it won't work.

#1875009

Hi Christian;

Now my code is

<p>[wpv-for-each field="wpcf-telefono_comercio"]
  <a href="tel:[types field='telefono_comercio' output='raw'][/types]"> [types field='telefono_comercio'][/types]</a>
  [/wpv-for-each]</p>

and it is not working.

Could you help me?
thanks

#1875023

Where can I see this on the front-end of your site?

#1875063

For example here:

/comercios/bar-garden/

#1875077
Screen Shot 2020-12-13 at 3.31.23 PM.png

I see the following HTML markup produced on the front-end of the site:

<a href="tel:647822241"> 647822241</a>

Maybe the space before the number is causing a problem? What markup do you expect to see instead?

#1875093

I remove this space and problem continues...

#1875107
Screen Shot 2020-12-13 at 4.24.47 PM.png

Maybe because you have this telephone link code in two places - one place for large screens and another for mobile screens? You only changed it in one place, but you must change it in both places.

#1875501

I think a change in all place.

#1875669
Screen Shot 2020-12-14 at 8.01.15 AM.png
Screen Shot 2020-12-14 at 7.55.35 AM.png

The Type field slug is still wrong in the mobile template editor. You can see the missing number in the browser inspector when you resize the screen and inspect the telephone number link using the browser tools.

El debate ‘[Cerrado] Issue with field phone’ está cerrado y no admite más respuestas.