Okay
  Public Ticket #2942687
adding phone number as a link
Closed

Comments

  • Alex Aldasoro started the conversation

    Hello.  Is it possible to add the "tel:" prefix on a telephone number so that it becomes a link for users to click on it while they are on their mobile device?

    Thank you.

    Alex

  •  1,851
    Miloš replied

    Hi, Alex.

    Thank you for purchasing our plugin.

    HTML5 includes protocols such as tel: and mailto: that browsers can use. Browsers respond differently to these protocols. Some will launch the phone app and add the number to the display while waiting for you to click the Call button. Others will make the call, while others will ask if it’s okay first.

    - You can create "call-able" links anywhere on your site, as well as inputting them in a cell of a wpDataTable, as a data type of "string", and it will be rendered as HTML.

    Add the code as text to the location you want the link to appear:

    <a href="tel:123-456-7890">CLICK TO CALL</a>
    

    Href=tel: creates the call link. This tells the browser how to use the number.

    “Tel: 123-456-7890 “creates the HTML phone number. The number within the quotes is the number it will call.

    The number within the >< tags is the visual portion and it can be anything you want it to be including the phone number, a line of text such as “Click to Call” or “Call Now”, or any other call to action you want. It should be descriptive of what’s going to happen when they click.

    Displaying a message instead of the number would look like this:


    <a href="tel:123-456-7890">CLICK TO CALL</a>

    Your visitors will see the text but when they click on it they see the dialling screen of their phones with your number ready for them to click the call button.

    - If you need any more assistance regarding this, please contact us further.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables