首页 文章

面包屑微数据未出现在结构化数据预览工具中

提问于
浏览
1

我正在尝试在开发网站上使用面包屑的微数据,我已经按照谷歌自己的例子,但由于某种原因,实际的面包屑不会在结构化数据测试工具中预览

这就是我的代码的样子:

<div class="back" xmlns:v="http://rdf.data-vocabulary.org/#">
    <h3>
        <span itemprop="breadcrumb" typeof="v:Breadcrumb">
            <a href="http://www.SteaksAndGame.com/" title="Online Shopping" rel="v:url" property="v:title">Steaks And Game</a>
        </span> :: 
        <span itemprop="breadcrumb" typeof="v:Breadcrumb">
            <a href="http://www.SteaksAndGame.com/wagyu-steaks/" title="Wagyu Steaks" rel="v:url" property="v:title">Wagyu Steaks</a>
        </span> :: 
        <span itemprop="breadcrumb" typeof="v:Breadcrumb"><a href="http://www.SteaksAndGame.com/wagyu-steaks/tenderloin-filet-mignon-052" title="Tenderloin - Filet Mignon" rel="v:url" property="v:title">Tenderloin - Filet Mignon</a>
        </span>
    </h3>
    <div class="clear"></div>
</div>

这就是结构数据工具向我展示的内容:

它显示 Headers 下的URL而不是痕迹链接 .

这是一个显示面包屑链接的示例:
enter image description here

  • 测试页面是here

  • 使用结构化数据工具预览页面是here

  • site使用 Asp.Net 构建

我尝试了很多东西,比如:

使用 符号而不是 :: I 've even copy pasted Google' s own example code用于微数据包痕迹实现:

<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <a href="http://www.example.com/dresses" itemprop="url">
        <span itemprop="title">Dresses</span>
    </a> ›
</div>  
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <a href="http://www.example.com/dresses/real" itemprop="url">
        <span itemprop="title">Real Dresses</span>
    </a> ›
</div>  
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <a href="http://www.example.com/clothes/dresses/real/green" itemprop="url">
        <span itemprop="title">Real Green Dresses</span>
    </a>
</div>

我复制了将页面的整个源代码粘贴到Linux服务器上的另一个页面上,令人惊讶地验证了它的正确性 . 我真的不知道该怎么做 . 任何意见,将不胜感激 .

2 回答

  • 2

    我找到了一种方法来使用当前的Schema.org标记来获得有效的面包屑 . 重要的是不要一个接一个地添加面包屑链接,而是添加 nest them 除了第一个之外的所有链接 'child' itemprop .

    <p id="breadcrumbs">
        <span itemprop="breadcrumb" itemscope="itemscope" itemtype="http://schema.org/Breadcrumb">
            <a href="http://www.example.com/dresses" itemprop="url"><span itemprop="title">Dresses</span></a>
            &raquo;
            <span itemprop="child" itemscope="itemscope" itemtype="http://schema.org/Breadcrumb">
                <a href="http://www.example.com/dresses/real" itemprop="url"><span itemprop="title">Real Dresses</span></a>
                &raquo;
                <span itemprop="child" itemscope="itemscope" itemtype="http://schema.org/Breadcrumb">
                    <a href="http://www.example.com/clothes/dresses/real/green" itemprop="url"><span itemprop="title">Real Green Dresses</span></a>
                </span>
            </span>
        </span>
    </p>
    

    这正是它如何与Data-Vocabulary.org一起使用,它只是使用更新的Schema.org标记 . 这将告诉搜索引擎您的面包屑是如何连接的 .

  • 0

    Use This SCHEMA strcture

    **

    将此用于微型数据用于面包屑

    **

    <div class="breadcrumbs">
      <ul>
        <li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="home" >
          <a href="index.html" title="Go to Home Page" itemprop="url">
            <span itemprop="title">Home</span>
          </a>
          <span>></span>
        </li>
        <li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="category5">
          <a href="product.html" title="Product" itemprop="url">
            <span itemprop="title">product name</span>
          </a>
          <span>></span>
        </li>
        <li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="category5">
          <a href=".finalproduct.html" title="final product" itemprop="url">
            <span itemprop="title">final product</span>
          </a>
          <span>></span>
        </li>
        <li class="category6"><strong>Final Product view</strong></li>
      </ul>
    </div>
    

    **

    重要:它也用于SEO目的

    **

    enter link description here

相关问题