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>
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.
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
Where can I see this on the front-end of your site?
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?
I remove this space and problem continues...
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.
I think a change in all place.
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.