adit
adit

Reputation: 33654

Issue with structuring breadcrumbs

I have the following html to structure my breadcrumbs:

<ul class="browsePageBC">
   <li class="product-breadcrumb" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/Wanita" itemprop="url" alt="" title="Wanita"><span class="product-breadcrumb-title" itemprop="title">Wanita</span></a><span class="glyphicon glyphicon-chevron-right"></span></li>
   <li class="product-breadcrumb" itemprop="child" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/Wanita/Aksesoris" itemprop="url" alt="" title="Aksesoris"><span class="product-breadcrumb-title" itemprop="title">Aksesoris </span></a></li>
</ul>

When I tested this on structured data testing tools, this is what it gives me. Wondering why it's not showing/parsing the child correctly?

Upvotes: 0

Views: 181

Answers (2)

Vishak N Kumar
Vishak N Kumar

Reputation: 21

Following sample code will help you to declare the parent and child property

<div id="breadcrumb">
    <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
        <a rel="home" href="http://www.example.com" itemprop="url">
          <span itemprop="title">Home</span>
        </a> ›
        <span itemprop="child" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
            <a href="http://www.example.com/topic/technology/" itemprop="url">
              <span itemprop="title">Technology</span>
            </a> ›
            <span itemprop="child" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                <a href="http://www.example.com/tag/gadgets/" itemprop="url">
                  <span itemprop="title">Gadgets</span>
                </a> ›
                <span>Sweet Post Title Goes Here</span>
            </span>
        </span>
    </span>
</div>

Let me know if these code help on your way.

Upvotes: 1

unor
unor

Reputation: 96597

Google’s documentation: Rich Snippets – Breadcrumbs

You’ll see in their examples that you either

  • list all entries in the correct order (without using the child property), or
  • use the child property in which case you would have to nest the child item under the parent item.

Note that each entry needs its own itemscope.

Upvotes: 0

Related Questions