同一项目的单独丰富摘录范围 [英] Separate rich snippet scopes for the same item

查看:65
本文介绍了同一项目的单独丰富摘录范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的网上商店创建丰富的摘要.我使用的项目类型之一是组织"类型.问题是我在网上商店的标题中指定了组织名称和图像,在页脚中指定了地址.介于两者之间的是网上商店的所有产品,评论等.

I am creating rich snippets for my webshop. One of the itemtypes I use is the "Organization" type. The problem with this is that I have specified the Organisation name and the image in the header of my webshop and the address in the footer. In between is the rest of the webshop with all it's products, reviews etc.

当我使用 http://www.google.nl/webmasters/tools测试丰富网页摘要时/richsnippets ,我得到了两个单独的组织,而不是一个.有没有办法将我的两个范围合并为一个组织?

When I test my rich snippets with http://www.google.nl/webmasters/tools/richsnippets, I get two separate Organisations instead of one. Is there a way to combine my two scopes to become one Organisation?

这是我现在遇到的情况:

Here is the situation I have right now:

<div id="header" itemscope itemtype="http://schema.org/Organization">
    <h1 itemprop="name">Webshopname</h1>
    <img id="logo" itemprop="logo" src="https://webshopurl/img/webshop-logo.png">
</div>

<div class="whole_article" itemscope itemtype="http://schema.org/Product">
    <h1 itemprop="name">Articlename</h1>
</div>

<div id="footer" itemscope itemtype="http://schema.org/Organization">
    <div id="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
        <div itemprop="streetAddress">Address 12</div>
        <div itemprop="postalCode">Postalcode</div> 
        <div itemprop="addressLocality">Locality</div>
    </div>
</div>

推荐答案

不要在同一事物上创建关于同一事物的多个项目页面.

您可以使用itemref属性向未嵌套在同一元素中的项目添加属性:

You can use the itemref attribute to add properties to an item that are not nested in the same element:

<div id="header" itemscope itemtype="http://schema.org/Organization" itemref="address">
    <h1 itemprop="name">Webshopname</h1>
    <img id="logo" itemprop="logo" src="https://webshopurl/img/webshop-logo.png">
</div>

<div class="whole_article" itemscope itemtype="http://schema.org/Product">
    <h1 itemprop="name">Articlename</h1>
</div>

<div id="footer">
    <div id="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
        <div itemprop="streetAddress">Address 12</div>
        <div itemprop="postalCode">Postalcode</div> 
        <div itemprop="addressLocality">Locality</div>
    </div>
</div>

这篇关于同一项目的单独丰富摘录范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆