html - SDTT 给出错误“评论没有指定评论项目”,但我使用的是 'itemReviewed' 属性
问题描述
我尝试itemReviewed
了不同的标签,但它不起作用,并且仍然显示错误:
审查没有指定审查项目。
https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fasphaltthemes.com扫描。
<!-- testimonial start-->
<section class="new_new_testi" itemprop="review" itemscope itemtype="http://schema.org/Review" >
<div class="testi_wrap">
<div class="new_new_testimonial_one">
<img itemprop="image" src="https://asphaltthemes.com/wp-content/uploads/2017/06/lady.jpg" alt="Tar Pro WordPress theme customer testimonial">
</div>
<div class="new_new_testimonial_two" itemtype="http://schema.org/Product">
<cite itemprop="reviewBody" itemprop="itemReviewed">Thank you for the wonderful customer service you provided! I was anxious about getting my website launched, and had several questions that you answered for me quickly and thoroughly. In a time where quality customer service seems to be a rarity, you stood out. I know that if I have to reach out to you about anything regarding my site in the future, you will be there to assist me almost immediately. THANK YOU!
</cite>
<p itemprop="author">- Laura Byrne / <a itemprop="url" target="_blank" href="https://www.facebook.com/LauraByrneStudios">Laura Byrne Studios</a></p>
</div>
</div>
</section>
<!-- testimonial END -->
<!-- testimonial start-->
<div class="customer_testimoinal cst_test" itemprop="review" itemscope itemtype="http://schema.org/Review" >
<cite itemprop="reviewBody" itemtype="http://schema.org/Product" itemprop="itemReviewed">Love this theme! Very easy to set up and customize, a LOT of great features – especially for the home page. Every request or question I’ve had has been addressed within 24 hours of sending an email, and the responses have been very helpful.</cite>
<div>
<img itemprop="image" src="https://asphaltthemes.com/wp-content/uploads/2017/06/KcvanHout-300x260-1-1.jpg" alt="Tar Pro WordPress theme customer testimonial">
</div>
<p>- <a itemprop="author" itemprop="url" href="https://wordpress.org/support/topic/great-super-responsive-to-requests/">Kelly Vanhout</a></p>
</div>
<!-- testimonial END -->
知道如何解决这个问题吗?
解决方案
您itemprop
在同一个元素上使用了两个属性(这是不允许的),并且您缺少该itemscope
属性(如果您使用该itemtype
属性):
<cite itemprop="reviewBody" itemtype="http://schema.org/Product" itemprop="itemReviewed">
<cite itemprop="reviewBody" itemprop="itemReviewed">
你想要的是这样的:
<div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product">
<!-- an item value; you can use properties (itemprop) inside this 'div' -->
</div>
<p itemprop="reviewBody">
<!-- a text value -->
</p>
推荐阅读
- mysql - 徽章系统 / MySQL GROUP BY 和 ORDER BY
- logging - 如何将日志流式传输到 Google Cloud Storage 存储桶,例如 Google Cloud Build
- java - 如何通过 Selenium WebDriver 测试禁用摄像头和麦克风弹出警报?
- collections - 如何安装 ansible Galaxy 集合的角色依赖项?
- node.js - KeystoneJS:删除 yarn.lock 后“keystone.getResolvers 不是函数”
- c# - app.UseRouting() 和 app.UseMvcWithDefaultRoute() 有什么区别?
- wordpress - Elementor 小部件文件夹 - WordPress
- nginx - Lua Envoy 上游代理
- vim - 在 VIM 中滚动时 TMUX 状态行消失
- kubernetes - Prometheus Operator Alertmanager - 自定义规则 - 在 config.plain 类型中找不到字段组