我在我的网站上使用schema.org微数据但我正在努力使用BreadcrumbList,因为Google的structured data testing tool无法对其进行验证。它看起来是正确的,我看不出有什么问题。
您可以点击上面的链接查看错误,但总而言之,Google表示itemtype属性对每个项都有一个无效值,并且还会抱怨列表中缺少mainEntityOfPage属性。我确实尝试在元标记中添加mainEntityOfPage但它仍然抱怨它。
我做错了什么?
<ul itemscope="" itemtype="http://schema.org/BreadcrumbList">
<li class="home" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a href="http://www.rossmod.co.uk/" title="Go to Home Page" itemprop="item"><span itemprop="name">Home</span></a>
<span>/ </span>
<meta itemprop="position" content="1">
</li>
<li class="category3" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a href="http://www.rossmod.co.uk/rc-cars.html" title="" itemprop="item"><span itemprop="name">RC Cars</span></a>
<span>/ </span>
<meta itemprop="position" content="2">
</li>
<li class="category10" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a href="http://www.rossmod.co.uk/rc-cars/car-kits.html" title="" itemprop="item"><span itemprop="name">Car Kits</span></a>
<span>/ </span>
<meta itemprop="position" content="3">
</li>
<li class="product">
<strong>Tamiya Lunch Box. No ESC [58347]</strong>
</li>
</ul>
答案 0 :(得分:3)
面包屑必须使用 breadcrumb 属性,并将其放在另一个itemcope(理想情况下为http://schema.org/WebPage)中。您还缺少itemprop="breadcrumb
,它必须在itemscope
之前。
<div class="breadcrumbs" itemscope itemtype="http://schema.org/WebPage">
<ul itemprop="breadcrumb" itemscope="" itemtype="http://schema.org/BreadcrumbList">
<li class="home" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a href="http://www.rossmod.co.uk/" title="Go to Home Page" itemprop="item"><span itemprop="name">Home</span></a>
<span>/ </span>
<meta itemprop="position" content="1">
</li>
<li class="category3" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a href="http://www.rossmod.co.uk/rc-cars.html" title="" itemprop="item"><span itemprop="name">RC Cars</span></a>
<span>/ </span>
<meta itemprop="position" content="2">
</li>
<li class="category10" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a href="http://www.rossmod.co.uk/rc-cars/car-kits.html" title="" itemprop="item"><span itemprop="name">Car Kits</span></a>
<span>/ </span>
<meta itemprop="position" content="3">
</li>
<li class="product">
<strong>Tamiya Lunch Box. No ESC [58347]</strong>
</li>
</ul>