How to use Microdata throughout a LocalBusiness website

自古美人都是妖i 提交于 2019-11-28 01:33:57
unor

You should add the Microdata on every page … because of reasons.

If you have a page where your business data is duplicated (e.g., a contact page where the business contact information is in the site header and in the page body), you should only markup one of these instances. Otherwise you’d create two LocalBusiness entities for the same entity.

If you have a page where your and partner business data is contained, you should mark up each business separately. So each business entity is represented by an own LocalBusiness entity.

One possible solution is to use json-ld. So with that you don't have to mix html and the Microdata and I would say a little bit easier to use.

This is the post in which they talked about that. http://blog.schema.org/2013/06/schemaorg-and-json-ld.html

Possible Eg for LocalBusiness:

<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "LocalBusiness",
    "url": "http://www.your-site.com",
    "logo": "http://www.your-site.com/img/logo.png",
    "name": "Bussiness name",
    "description": "Lorem ipsum..",
    "telephone": "+61 ... ...",
    "address":
    {
      "@type": "PostalAddress",
      "streetAddress": "Your street 20",
      "addressLocality": "Melbourne",
      "addressRegion": "Victoria",
      "addressCountry": "Australia"
    }
}
</script>

You can check this sintax using this.

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