Separate rich snippet scopes for the same item

后端 未结 1 1230
Happy的楠姐
Happy的楠姐 2021-01-15 01:33

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

相关标签:
1条回答
  • 2021-01-15 01:45

    Don’t create several items about the same thing on the same page.

    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>
    
    0 讨论(0)
提交回复
热议问题