PHP or Short Code of Rating
-
Hi,
I am using your plugin for my online gaming site. I want to put the aggregate rating json schema markup within the head section of each game page.
Is there any php or shortcode which will print average ratings and the total number of users rated for the post individually, so that each time a user vote a post it will dynamically comes within json script.
The json script will be look like below:
<script type=”application/ld+json”>
{
“@context”: “https://schema.org/”,
“@type”: “VideoGame”,
“name”: “Game Name”,
“description”: “Game description”,
“publisher”: “Publisher Name”,
“aggregateRating”: {
“@type”: “AggregateRating”,
“ratingValue”: “here will print the average rating”,
“bestRating”: “5”,
“ratingCount”: “here will print the total number of users rated”
},
}
</script>Your help really appreciated!
The page I need help with: [log in to see the link]
- The topic ‘PHP or Short Code of Rating’ is closed to new replies.