Skip to content

Instantly share code, notes, and snippets.

@lennartvdd
Created November 17, 2014 14:49
Show Gist options
  • Save lennartvdd/a9427ba47d634bcf2ec1 to your computer and use it in GitHub Desktop.
Save lennartvdd/a9427ba47d634bcf2ec1 to your computer and use it in GitHub Desktop.
implement schema.org aggregate rating
<span itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate">
<span itemprop="rating" style="display:none;">4</span>
<span itemprop="count" style="display:none;">1</span>
</span>
<!-- SHOULD BECOME -->
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue" style="display:none;">4</span>
<span itemprop="reviewCount" style="display:none;">1</span>
<meta itemprop="ratingCount" content="1" />
</span>
<!--
note: entire block should fall in http://schema.org/Product element
Test the changes to HTML source with:
Google webmaster tools > Uiterlijk van Site Search > Gestructureerde gegevens > Product > (click a random Page-URL) > Live gegevens testen.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment