Stars and aggregate rating are not displayed when using schema.org markup, as well as an overview on the xhtml page

I am trying to implement microData schema.org format in my xhtml template. Since I am using xhtml templates, I needed to add

<div itemprop="reviews" itemscope="itemscope" itemtype="http://schema.org/Review"> 

instead:

 <div itemprop="reviews" itemscope itemtype="http://schema.org/Review"> 

otherwise my template will not be parsed. I found a solution here

My markup is as follows:

 <div itemscope="itemscope" itemtype="http://schema.org/Place"> <div itemprop="aggregateRating" itemscope="itemscope" itemtype="http://schema.org/AggregateRating"> <span itemprop="ratingValue">#{company.meanRating}</span> stars - based on <span itemprop="reviewCount">#{company.confirmedReviewCount}</span> reviews </div> <ui:repeat var="review" value="#{company.reverseConfirmedReviews}"> <div itemprop="reviews" itemscope="itemscope" itemtype="http://schema.org/Review"> <span itemprop="name">Not a happy camper</span> - by <span itemprop="author">#{review.reviewer.firstName}</span>, <div itemprop="reviewRating" itemscope="itemscope" itemtype="http://schema.org/Rating"> <span itemprop="ratingValue">1</span>/ <span itemprop="bestRating">5</span>stars </div> <span itemprop="description">#{review.text} </span> </div> </ui:repeat> </div> 

When testing this at http://www.google.com/webmasters/tools/richsnippets I don't get any stars back or aggregate review counter

What am I doing wrong here?

+4
source share
2 answers

Yes!! The problem consisted of two errors: first, someone called the div class “ hReview-aggregate ”, which is suitable when you run Microformats , not Microdata

The second mistake was that I misunderstood the schema.org specification. Here's how I ended up:

  <div class="box bigBox" itemscope="itemscope" itemtype="http://schema.org/LocalBusiness"> <span itemprop="name">#{viewCompany.name}</span> <div class="subLeftColumn" style="margin-top:10px;" itemprop="aggregateRating" itemscope="itemscope" itemtype="http://schema.org/AggregateRating"> <div class="num"> <span class="rating" id="companyRating" itemprop="ratingValue">#{rating}</span> </div> <div>Grade</div> <div class="num"> <span class="count" id="companyCount" itemprop="reviewCount"> #{confirmedReviewCount} </span> </div> </div> </div> 

Hope this helps !!!!!

+3
source

hey checkout how guys guys did it for this url: www.holidayiq.com/destinations/Lonavala-Overview.html

you can check out a snippet of this tool there: http://www.google.com/webmasters/tools/richsnippets

and google from this keyword "lonavala sights" and you will see the same fragment, they used microdata to generate these reviews in the fragment, they used typeof = "v: Review-aggregate" and much more, have a look at it, its good implementation of reviews in the form of a fragment of work.

+1
source

Source: https://habr.com/ru/post/1382718/


All Articles