product - 'Product' 内问题和答案的 Schema.org 标记

标签 product schema.org microdata google-rich-snippets

有人可以建议为用户可以购买某些产品的页面添加正确的 Schema.org 标记的最佳方法吗?我正在那里添加 Product 标签(用于 Rich Snippets)。

我想增加询问有关该产品的问题的可能性,但我没有找到可以用作嵌入项的属性。

例子:

<div itemscope="" itemtype="http://schema.org/Product">
    <meta itemprop="brand" content="Brand">
    <meta itemprop="url" content="URL">
    ......

    <div id="question1" itemprop=??????? itemscope="" itemtype="http://schema.org/Question">
         ......
        <div id="answer1" itemprop=??????? itemscope="" itemtype="http://schema.org/Question/Answer">....</div>
        <div id="answer2" itemprop=??????? itemscope="" itemtype="http://schema.org/Question/Answer">....</div>
    </div>
    ...
    <div id="question10" itemprop=??????? itemscope="" itemtype="http://schema.org/Question">
        ......
        <div id="answer1" itemprop=??????? itemscope="" itemtype="http://schema.org/Question/Answer">....</div>
        <div id="answer2" itemprop=??????? itemscope="" itemtype="http://schema.org/Question/Answer">....</div>
    </div>
</div> 

最佳答案

没有属性可以将Question 添加到Product
但是有一个属性表示 Question 是关于 Product 的:about .

有多种方法可以用微数据对其进行标记。下面是一个使用 itemref 的例子:

<div id="product-42" itemprop="about" itemscope itemtype="http://schema.org/Product">
</div>

<div itemscope itemtype="http://schema.org/Question" itemref="product-42">
</div>

<div itemscope itemtype="http://schema.org/Question" itemref="product-42">
</div>

要将答案链接到问题,您可以使用suggestedAnswer/acceptedAnswer .

关于product - 'Product' 内问题和答案的 Schema.org 标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44973411/

相关文章:

street-address - 如何使用 schema.org/PostalAddress 处理复杂地址?

schema.org - 谷歌 "The full body of the article"是什么意思

seo - 模式微数据 : Is it damaging to reference an item that is only present on some pages?

rdf - 微格式、rdf 或微数据

xml - 博客文章标签和类别的 HTML5 语义标记

html - 如何确定带有微数据的 anchor 标签的值(value)?

php - 从 WooCommerce 中的产品属性中删除 <p> 标签

php - 从 Woocommerce 主页上的简码隐藏促销产品

php - Magento 产品的 API

php - Woocommerce:特定产品的强制优惠券