Skip Navigation

[Resolved] Button or alternative

This thread is resolved. Here is a description of the problem and solution.

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.

This topic contains 1 reply, has 1 voice.

Last updated by hoogeshD 6 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#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.

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 hidden link

What is the link to your site?
hidden link

#2798969

Christopher Amirian
Supporter

Languages: English (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