1

For a restaurant with two physical locations I am trying to add geo data to the rich snippets for both locations. When I add geodata for itemtype restaurant, the code validates, but then I can only add one location. Adding geo data in other parts results in errors like: Error: Page contains property "geo" which is not part of the schema.

I am trying to add this code:

<div itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates">
 <meta itemprop="latitude" content="37.7793" />
 <meta itemprop="longitude" content="-122.4192" />
</div>

The code below is the complete rest of code which validates correctly. Any suggestions/comments are also very welcome.

   <div itemscope itemtype="http://schema.org/Restaurant">
        <span itemprop="name">Our Restaurant</span><br><br>
        <meta itemprop="description" content="The best" />
        <meta itemprop="servesCuisine" content="West European" />
        <meta itemprop="menu" content="url/menu" />
        <meta itemprop="paymentAccepted" content="Pin, Vpay" />
        <meta itemprop="logo" content="link to logo" />
        <meta itemprop="url" content="url" />
        <meta itemprop="acceptsReservations" content="0123 12345678910">
        <meta itemprop="email" content="info@myrestaurant.nl" />
    </div>

    <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
        <span itemprop="streetAddress">Address</span>, 
        <span itemprop="postalCode">12345</span> 
        <span itemprop="addressLocality">City</span><br><br>
        <meta itemprop="telephone" content="01234 12345678910" />
    </div>

    <div itemprop="location" itemscope itemtype="http://schema.org/PostalAddress">
        <span itemprop="streetAddress">Address1</span>, 
        <span itemprop="postalCode">54321</span> 
        <span itemprop="addressLocality">City1</span><br><br>
        <meta itemprop="telephone" content="+10 12345678910" />
    </div>
unor
  • 92,415
  • 26
  • 211
  • 360
het.oosten
  • 885
  • 7
  • 21

1 Answers1

1

het, as your markup currently sits, you have three separate and independent schema types, and search engines will not be able to understand the relationship between them. First, you need to nest the PostalAddress type within the Restaurant schema type, like this:

<div itemscope itemtype="http://schema.org/Restaurant">
<span itemprop="name">Our Restaurant</span><br><br>
<meta itemprop="description" content="The best" />
<meta itemprop="servesCuisine" content="West European" />
<meta itemprop="menu" content="url/menu" />
<meta itemprop="paymentAccepted" content="Pin, Vpay" />
<meta itemprop="logo" content="link to logo" />
<meta itemprop="url" content="url" />
<meta itemprop="acceptsReservations" content="0123 12345678910">
<meta itemprop="email" content="info@myrestaurant.nl" />

<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress">Address</span>, 
<span itemprop="postalCode">12345</span> 
<span itemprop="addressLocality">City</span><br><br>
<meta itemprop="telephone" content="01234 12345678910" />
</div>
</div>

You also need to use two separate Restaurant types, one for each location. You can show the relationship between the two by using either the "branchOf" property or the "subOrganizaiton" property. But each location must use its own Restaurant schema type and then the PostalAddress type must be nested within each.

daviddeering
  • 819
  • 1
  • 7
  • 9
  • Thank you for pointing this out! So you are saying that I will have to duplicate the schema from above for the second restaurant, and not use itemprop location? Because of the lay-out I will have to put almost all data in meta tags (my concern is that Google will see this as spamming) +1 – het.oosten Aug 01 '14 at 15:07
  • Essentially, yes. Instead of nesting two PostalAddress types within one Restaurant type, you need to use two separate Restaurant types. Then you can mark up the address for each. You can make the connection between the two by using the branchOf or subOrganization properties. If you're concerned about meeting Google's guidelines, then you shouldn't "hide" your markups with meta tags. Certain properties can be defined with meta tags in order to provide information that's machine-readable, but for the most part, what you mark up should be visible on the page. – daviddeering Aug 02 '14 at 04:04
  • Marked as solved, because adding itemtype restaurant twice solves the problem with the geo data. – het.oosten Aug 02 '14 at 08:40
  • 1
    @het.oosten: Note that you don’t have to duplicate the information. You could either use [Microdata’s `itemref` attribute](http://stackoverflow.com/a/18969585/1591669), or add the general data (which applies to both restaurants) to a `Organization` and relate two `Restaurant` items (with properties as explained by daviddeering). – unor Aug 03 '14 at 19:06