Structured data not being picked up on telephone number

人走茶凉 提交于 2019-12-11 03:33:42

问题


I have the following snippet of code in a website. When I run this through the Google Structured Data Testing Tool, it doesn’t pick up the phone number. I’m not sure where I’m going wrong:

<div class="telephone-number" itemscope itemtype="http://schema.org/Organization">
    <p>Call Us: <a itemprop="telephone" href="tel:07749918143">07749 918 143</a></p>
</div>

The error generated by the validator is:

Node is empty. Double check that this is desired and consider removing.

Can someone tell me where I’m going wrong please?


回答1:


Schema.org’s telephone property expects Text as value, not a URL.

(There’s a feature request to change this.)

So you could use something like this:

<div itemscope itemtype="http://schema.org/Organization">
    <p>Call Us: <a href="tel:07749918143"><span itemprop="telephone">07749 918 143</span></a></p>
</div>


来源:https://stackoverflow.com/questions/30708484/structured-data-not-being-picked-up-on-telephone-number

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!