• 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/&#8221;,
    “@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!

    • This topic was modified 7 years, 2 months ago by Jas Saran.

    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.