Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #588135

    I have a phone number as a menu item, but I’d like visitors on a mobile phone to be able to click the number and send a text message. I tried putting “sms://+1413427xxxx” (but with the real number) in the URL box, but that doesn’t work. Is there a way to have our “TEXT US” menu item be clickable on a mobile phone?


    Hey rasa!

    Please link it as following
    <a href="sms:12345678">Send SMS</a>



    Okay, this was stupid on my part and I apologize! I am currently building a new website for this client using Enfold, however still using the old theme (Kallyas) with their old site. I wanted to move away from Kallyas, but I’m still building the new Enfold version. But as for the sms issue, I will have the same issue on the new Enfold site, but it seems like this is a WordPress menu issue, and not so much theme related, HOWEVER, when I paste in the code you suggested into the URL field on the Menu page, I click Save Menu, and then when I open the menu item up again the code has disappeared. This happens on both the old Kallyas site and the new Enfold site. I click Save Menu and the URL code simply disappears. Any ideas? I’m thinking the URL field in the Menu section of the WordPress dashboard will only take a regular URL, and not an HTML code link. Is there some CSS workaround?



    Please use # as URL and then add following code to Functions.php file in Appearance > Editor

    function avia_custom_element_id(){
    jQuery('#menu-item-2375 a').attr('href','sms:+370123123');
    add_action('wp_footer', 'avia_custom_element_id');

    Best regards,


    I’m guessing you mean “functions-enfold.php”

    Where exactly should it go in the file?



    No, “functions.php” file. It is right below “functions-enfold.php” file in Appearance > Editor. You can add the code to bottom.

    Best regards,


    Ah, great. That works perfectly! Will this edit stay in the functions.php file when I next update the theme, or will I have to add it again?



    It will be overwritten. To avoid adding it again, please consider using a child theme :)



    You are completely right about using a Child Theme!

    Thanks again and again for your always fast and helpful answers!

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘sms – text message – link in menu’ is closed to new replies.