2016-04-21 24 views
0

我爲當地企業構建了一個網站,該網站擁有高爾夫球場,室內體育場館(網球,壁球,wally球,擊球籠,鸚鵡螺),餐廳,餐飲,並提供婚禮和招待會。不知道如何開始。任何幫助表示讚賞。如何將結構化數據(JSON-LD)用於由多個子業務組成的本地業務

+0

我假設您的意思是詞彙表Schema.org?無論如何,這個問題太廣泛了。如果你有一個特定的問題或你嘗試過的問題,堆棧溢出是適當的。也許[網站管理員的這個答案](http://webmasters.stackexchange.com/a/92108/17633)SE可以幫助您找到合適的Schema.org類型。 – unor

+0

您需要提供更多的上下文。你想達到什麼目的。你正在編寫一個API嗎?你在實施SEO嗎?等等... –

回答

2

下午好,

下面的例子可能會有所幫助。請注意,對於@id,我假定您爲每個實體創建了一個專用頁面,並在示例中指明瞭該鏈接,但它不必是工作鏈接,因此如果您尚未創建專用鏈接頁面,您可以爲每個實體創建一個唯一的ID(此ID不應隨時間而改變)。請參閱schema的部門和子組織的定義。

<script type="application/ld+json"> 
{ 
    "@context" : "http://schema.org", 
    "@type" : "LocalBusiness", 
    "name" : "Business Name", 
    "@id" : "http://www.your-company-site.com", 
    "logo" : "http://www.your-company-site.com/logo.jpg", 
    "sameAs" : [ "", "" ], 
    "url" : "http://www.your-company-site.com", 
    "email" : "[email protected]", 
    "faxNumber" : "+1-401-555-1213", 
    "contactPoint" : { 
    "@type" : "ContactPoint", 
    "telephone" : "+1-401-555-1212", 
    "contactType" : "customer service" 
    }, 
    "openingHoursSpecification": [ 
    { 
    "@type": "OpeningHoursSpecification", 
    "dayOfWeek": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ], 
    "opens": "09:00", 
    "closes": "21:00" 
    }, 
    { 
    "@type": "OpeningHoursSpecification", 
    "dayOfWeek": [ "Saturday", "Sunday" ], 
    "opens": "10:00", 
    "closes": "23:00" 
    } 
    ], 
    "department" : [ 
    { 
    "@type" : "GolfCourse", 
    "name" : "Golf Course Name", 
    "@id" : "http://www.your-company-site.com/golf-course-dedicated-page-url", 
    "logo" : "http://www.your-company-site.com/logo.jpg", 
    "sameAs" : [ "", "" ], 
    "url" : "http://www.your-company-site.com/golf-course-dedicated-page-url", 
    "email" : "[email protected]", 
    "faxNumber" : "+1-401-555-1215", 
    "contactPoint" : { 
     "@type" : "ContactPoint", 
     "telephone" : "+1-401-555-1214", 
     "contactType" : "customer service" 
    }, 
    "openingHoursSpecification": [ 
     { 
     "@type": "OpeningHoursSpecification", 
     "dayOfWeek": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ], 
     "opens": "09:00", 
     "closes": "19:00" 
     }, 
     { 
     "@type": "OpeningHoursSpecification", 
     "dayOfWeek": [ "Saturday", "Sunday" ], 
     "opens": "09:00", 
     "closes": "17:00" 
     } 
    ] 
    }, 
    { 
    "@type" : "TennisComplex", 
    "name" : "Tennis Complex Name", 
    "@id" : "http://www.your-company-site.com/tennis-complex-dedicated-page-url", 
    "logo" : "http://www.your-company-site.com/logo.jpg", 
    "sameAs" : [ "", "" ], 
    "url" : "http://www.your-company-site.com/tennis-complex-dedicated-page-url", 
    "email" : "[email protected]", 
    "faxNumber" : "+1-401-555-1216", 
    "contactPoint" : { 
     "@type" : "ContactPoint", 
     "telephone" : "+1-401-555-1215", 
     "contactType" : "customer service" 
    }, 
    "openingHoursSpecification": [ 
     { 
     "@type": "OpeningHoursSpecification", 
     "dayOfWeek": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ], 
     "opens": "09:00", 
     "closes": "19:00" 
     }, 
     { 
     "@type": "OpeningHoursSpecification", 
     "dayOfWeek": [ "Saturday", "Sunday" ], 
     "opens": "09:00", 
     "closes": "17:00" 
     } 
    ] 
    } 
    ], 
    "subOrganization" : { 
    "@type" : "Restaurant", 
    "name" : "Restaurant Name", 
    "@id" : "http://www.your-company-site.com/restaurant-dedicated-page-url", 
    "logo" : "http://www.your-company-site.com/logo.jpg", 
    "sameAs" : [ "", "" ], 
    "url" : "http://www.your-company-site.com/restaurant-dedicated-page-url", 
    "email" : "[email protected]", 
    "faxNumber" : "+1-401-555-1217", 
    "contactPoint" : { 
     "@type" : "ContactPoint", 
     "telephone" : "+1-401-555-1216", 
     "contactType" : "customer service" 
    }, 
    "openingHoursSpecification": [ 
     { 
     "@type": "OpeningHoursSpecification", 
     "dayOfWeek": [ "Monday", "Tuesday" ], 
     "opens": "11:30", 
     "closes": "22:00" 
     }, 
     { 
     "@type": "OpeningHoursSpecification", 
     "dayOfWeek": [ "Wednesday", "Thursday", "Friday" ], 
     "opens": "11:30", 
     "closes": "23:00" 
     }, 
     { 
     "@type": "OpeningHoursSpecification", 
     "dayOfWeek": [ "Saturday", "Sunday" ], 
     "opens": "16:00", 
     "closes": "23:00" 
     } 
    ] 
    } 
} 
</script> 
相關問題