如何使用WordPress自定义链接创建可点击的电话链接? [英] How to create clickable telephone link with WordPress Custom Links?

查看:157
本文介绍了如何使用WordPress自定义链接创建可点击的电话链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用WordPress自定义链接,并且需要为电话号码创建可点击的链接.通过使用以下代码,我在HTML方面从未遇到任何问题:<a href="tel:2065221677">(206) 522-1677</a>.但是WordPress很显然拥有自己的想法,更改了代码,并且我的链接无法在iPhone上打开.

I am using WordPress custom links and I need to create clickable links for phone numbers. I have never had a problem doing this in HTML by using the following: <a href="tel:2065221677">(206) 522-1677</a>. But WordPress obviously has a mind of it's own, changes code, and my link does not open with my iPhone.

我发现这篇文章一个类似的问题,我尝试了jQuery脚本,但是当我单击链接时它不起作用.我收到一个错误:需要验证,需要用户名和密码.我相信如果可点击而不是onload,此代码将起作用.将"phone"用作CSS类也很好.

I found this post where someone had a similar issue and I tried the jQuery script but it doesn't work when I click on the link. I get an error: Authentication required, wanting a user name and password. I believe this code would work if it were clickable not onload. Using "phone" as a CSS class is great also.

有人可以帮我吗?

推荐答案

我希望你们不要建议更改核心文件或主题文件.最好将此功能捆绑到这样的插件中,例如 http://wordpress.org/扩展/插件/电话号码链接器/

I hope you guys aren't suggesting changing the core or theme files. Much better to bundle this functionality into a plugin like this one http://wordpress.org/extend/plugins/telephone-number-linker/

这篇关于如何使用WordPress自定义链接创建可点击的电话链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆