-2

I'm not one for code beyond very simple basics. I'm helping a friend with his site (http://www.lacherconstruction.com/) and am trying to figure out if I can make the phone number in the header clickable on mobile.

The template used doesn't allow it in a predetermined field (disables characters such as <> so can't insert an there).

EDIT: I can't insert a tel: either.

My question: Is there an option I can do in Squarespace to force the phone number in the site header to have a tel: so click-to-call is enabled?

Some thoughts I've had:

I was thinking of using code injection, but am not sure the best way to do it. For reference, this site is using the Montauk template, but what I've seen on the template didn't seem helpful (such as https://support.squarespace.com/hc/en-us/articles/115000629628-Adding-buttons-to-headers)

I know the field is div class="site-phone" but that's about all I've got. Haven't seen anything helpful in Squarespace support forum that seemed to answer my question.

Thank you in advance!

  • I think you need to clarify the questions – M__ Sep 03 '19 at 02:04
  • @MichaelG. I'm not sure how else to explain. I can't post pictures since I don't have 10 rep. Short version: Phone number in header can't be made into a tel: link. Field blocks inputting anything. Not sure what options I have. I edited the original question to try and clarify. – CRuleSportsGuy Sep 06 '19 at 01:35

1 Answers1

0

If you can insert the value tel: inside the link destination than iOS will make that link tappable and will prompt the user if they want to invoke the call / dialing app.

See this documentation for reference:

https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html

Cody Caughlan
  • 32,456
  • 5
  • 63
  • 68
  • Hey Cody, that's not quite what I'm looking for. In short, the field in question is locked by the "Business Information" field. I'm curious if there's a way to insert some custom code to make this a tel: I can't actually post a photo of it, sadly, because I don't have 10 reputation, but in short there's a field for me to enter the phone number, and it won't allow me to code anything. Any help is appreciated! – CRuleSportsGuy Sep 03 '19 at 00:24
  • @CRuleSportsGuy can you run custom javascript to find those elements and dynamically insert the `tel:` prefix? – Cody Caughlan Sep 04 '19 at 16:08
  • I'll admit, I'm not sure. I have never tried anything with JS. I know I can utilize Squarespace's "code injection" functionality to insert a script, I've done that to allow for a couple of stylings on the site that I found in the Squarespace help forum. – CRuleSportsGuy Sep 06 '19 at 01:36