问题原文
原帖链接 · johna · CC BY-SA 3.0
I have a website that lists tours from many different tour operators. Each tour page has pricing, location, ratings and reviews, and may or may not have tour dates (some tours run every day, some run on demand, some run on specific dates).
There doesn't seem to be a correct schema.org schema for this. Event or SaleEvent seem to be good choices but StartDate is a required field. Then there is Product and Service which might be the right choice.
I am wondering how best to mark this up for best ranking by search engines, local search (by tour location), and rich snippets?
已采纳解答
原帖链接 · inkovic · CC BY-SA 3.0
Here's how you would do this:
Have a wrapper for https://schema.org/ProfessionalService for the Tour Guide Company.
Because ProfessionalService is a child of LocalBusiness, you can inherit all of the relevant business properties details or simply use mainEntityOfPage to reference the Tour Company page on your website.
Then, use the makesOffer item property - the expected type for this is an Offer found at https://schema.org/Offer.
Each offer would contain your pricing, location, ratings and reviews. Here is the list:
- Pricing: The
priceitem property of itemtypeOffer. The expected type is either plaintextornumber. - Location: The
availableAtOrFromitem property of itemtypeOffer. The expected itemtype isPlace, meaning you can use any of it's children such asLocalBusinessor even grandchildren likeProfessionalService.* - Reviews and Ratings: The
reviewitem property of itemtypeReview. Straight forward, thereviewRatingitem property ofReviewwill be used for reviews.reviewRatingis ofRatingitemtype, use the childaggregatedRatingfor a collation of reviews. - Dates and Flexibility:
availabilityStartsandavailabilityEndscover you for this one. These both return theDateTime- this is where the flixibility of time comes in.DateTimecontains a whole lot of properties, includingavailabilityStartsandavailabilityEnds- which can be either aDemandor anOffer. **
Some other notes:
https://schema.org/AggregateOfferis a child ofOfferand can be used to replace the expected itemtype ofOfferfor themakesOfferitem property ofProfessionalService. This can be useful if you have different versions of tours (such as a premium package) or if you have a list view page containing all tours from a single company.
You can also inverse this, by having a AggregatedOffer for just the location, and list all of the ProfessionalServices and their Offers if multiple Tour Companies work at the same location and the same date etc.
As a general tip, pay attention to the expected type column on schema.org to figure out how best to tackle a problem.
The LocalBusiness + children being used with Offer is a very common data design pattern and would probably be one of most use in practical rich snippet design.
You can also use additionalType to marry two or more Schema Item Types.
* Notice an inception theme? Good. This can be used to create a recursive schema, meaning that you can have an offer within an offer. Pay attention to expected types to see if you can jump back up the hierarchy and find an appropriate child item type if you are ever in a jam. ** Notice that this can also create a recursive schema, so you can have and offer within an offer.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
