• Resolved Matt Hancock

    (@matthancocknz)


    Would it be possible now or in the future to have the ability to create a link to the phone number in the Contact Info Widget? It’d be more convenient for users to be able to tap/click on the phone number directly rather than having to resort to other means.

    Cheers.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello there,

    It should be added in the future version update. At the mean time, you try enabling it with a couple of jQuery code.

    1. Install and activate the TC Custom JavaScript plugin
    2. Go To Appearance > Custom JavaScript
    3. Paste the following code into the provided box

    
    (function($){
    
      if( $('.contact-phone').length ){
    
        var getText = $('.contact-phone').contents().filter(function() {
                        return this.nodeType == 3;
                      }).text();
        var tel     = '<a href="tel:'+getText+'">'+getText+'</a>';              
    
        $('.contact-phone').html('<span><i class="fa fa-phone"></i></span>'+tel);              
    
      }
    
    })(jQuery);
    

    4. Update

    Regards,
    Kharis

    Thread Starter Matt Hancock

    (@matthancocknz)

    That worked a treat. Thanks for going above and beyond with the code snippet and I look forward to seeing it rolled out in a future update. 🙂

    • This reply was modified 6 years, 7 months ago by Matt Hancock.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding phone number link into Contact Widget’ is closed to new replies.