"属性publisher.itemtype具有无效值"

时间:2016-11-12 17:51:28

标签: schema.org

我是代码新手。我正在尝试在我的联系页面上为Google评论添加结构化数据代码:

http://www.catnips.co.uk/in-home-mobile-cat-groomer-feline-behaviourist.html

我正在使用Google地图客户评论中的评论。

在Google结构化数据测试工具中进行测试,它说

  

属性publisher.itemtype的值无效。

我无法弄清楚我做错了什么。

<div itemprop="review" itemscope itemtype="http://schema.org/Review">
    <meta itemprop="author" content="Anita Kelsey">

    <strong itemprop="itemreviewed">Mobile Cat Grooming</strong> by <a href="https://www.google.co.uk/maps/place/The+Notting+Hill+Cat+Sitting+and+Cat+Grooming+Company/@51.5254631,-0.2526499,12z/data=!4m10!1m2!2m1!1smobile+cat+grooming!3m6!1s0x4876101c4f92036d:0x8514584f53249c41!8m2!3d51.5180716!4d-0.2036502!9m1!1b1/">Jen Crothers</a><br />

    <strong>My Rating:</strong> <span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating"><img src="http://www.catnips.co.uk/wp-content/uploads/2014/09/5-stars-356x73.png" alt="5 stars" width="356" height="73" class="alignnone size-medium wp-image-4614" /><meta itemprop="ratingValue" content="5" /><meta itemprop="bestRating" content="5" /></span>
</div>

<span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">

Anita was absolutely brilliant with my Persian cat Ernie, who was a wriggly customer at times. She skillfully and gently removed the mats on his coat and gave him a very thorough groom. Brilliant, professional and easily a five star service provided from start to finish.
<meta itemprop="ratingValue" content="5" /><meta itemprop="bestRating" content="5" />

4 个答案:

答案 0 :(得分:17)

错误不在您在问题正文中提供的代码中,而是在JSON-LD中。在结构化数据测试工具中,您可以单击要导致错误的代码中的行的错误。这有助于您确定导致问题的原因。

错误通知您为发布商提供的商品类型无效。虽然schema.org确实支持Person publisher属性的Article类型,但Google不支持。 Google仅支持Organization ,而不支持发布商属性的类型,如Google Developers上Articles Structured Data页面所述。

答案 1 :(得分:1)

您可以修复以下设置中的错误:Yoast SEO>搜索外观>知识图>选择公司或人员。

enter image description here

答案 2 :(得分:0)

当然可以!您只是还不知道。 ;)尝试使用此行:

"publisher":{"id":"http://www.catnips.co.uk/#organization"},

答案 3 :(得分:0)

"baseSalary": {
 "@type": "MonetaryAmount",
 "currency": "EUR",
 "value": {
  "@type": "QuantitativeValue",
  "value": 850,
  "unitText": "MONTH"
 }
}