php - 错误:事物不是 itemReviewed 属性的已知有效目标类型
问题描述
它显示错误:对于 itemReviewed 属性来说,Thing is not a known valid target type.for 下面的代码。请帮忙。
<div itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating" style="color: #333; margin: 10px auto; font-size: 12px;display: inline-block;width: 100%;line-height: 20px;">
<span itemprop="itemReviewed" itemscope itemtype="http://schema.org/Thing" style="color: #333; margin: 20px auto; font-size: 12px;">
<span itemprop="name">#</span>
</span>
<span>
<a href="https://#/testimonials.html" title="Check all reviews" rel="nofollow" style="color: #333; margin: 20px auto; font-size: 12px;">Reviews</a>
</span><br>
<span itemprop="ratingValue" style="color: #333; margin: 20px auto; font-size: 12px;">5</span> rating, out of
<span itemprop="bestRating" style="color: #333; margin: 20px auto; font-size: 12px;">5</span> based on
<span itemprop="ratingCount" style="color: #333; margin: 20px auto; font-size: 12px;">1127</span> Patients.
解决方案
如果您想获得丰富的结果,Google 仅支持 itemReviewed 类型的子集:
https://developers.google.com/search/docs/data-types/review-snippet#review-properties
文档有点令人困惑,因为它确实提到了关于 itemReviewed 的值的事物,但随后列出了它可以是哪些特定类型。
推荐阅读
- java - 排除的嵌入式 tomcat 仍然存在于 lib-provided 文件夹中
- javascript - 如果语句在 https 获取响应中移过 [ ]
- llvm - 执行带有分段错误的 LLVM 代码结果
- c# - 声明授权在 Asp .Net Core 中拒绝访问
- sml - 这里的“isSome old(tl dates)”是什么意思;为什么“最旧(tl 日期)”有一个选项类型?
- python - 熊猫爆炸用空单元格创建行
- r - 来自未标记矩阵的R中的多个箱线图?
- python - 博彩公司用硒刮擦
- kubernetes - 无法从其他 pod 命中 kubernetes 集群中的 pod,但可以从入口
- java - 如何更改播放java剪辑的毫秒位置