Saltar navegación

[Resuelto] Button or alternative

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

I want to use a phone number stored in a custom field as a dynamic button link so that when clicked, it dials the number (e.g., tel:+1234567890). However, the Toolset Button block does not support phone links.

Solution:

Use an HTML block instead of the Button block and insert the following custom code:

<a href="tel:[types field='phone-number' output='raw'][/types]" class="call-button">Call Now</a>

Replace 'phone-number' with the actual field name. This will generate a dynamic link that users can click to call the number directly from their mobile device.

Relevant Documentation:

https://toolset.com/forums/topic/display-a-phone-in-a-directory-website/

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.

Este tema contiene 1 respuesta, tiene 1 mensaje.

Última actualización por hoogeshD 1 year, 3 months ago.

Asistido por: Christopher Amirian.

Autor
Mensajes
#2798811
2025-03-01 09 00 53.jpg

Tell us what you are trying to do?
Use the phone number from custom field in a Dynamic button. The button should become a url e.g. enlace oculto

Is there any documentation that you are following?
Could not find any.

Is there a similar example that we can see?
The call button on enlace oculto

What is the link to your site?
enlace oculto

#2798969

Christopher Amirian
Colaborador

Idiomas: Inglés (English )

Hi,

Welcome to Toolset support. The button block does not have the phone capability, instead I suggest that you use an HTML block and add the code below:

https://toolset.com/forums/topic/display-a-phone-in-a-directory-website/

So basically you will replace the link of the button with the types shortcode and add the name of the field there. In the example I mentioned in the linked ticket it was called cellphone.

Thanks.

#2799427

Thanks Christopher