XF 1.5 Showing start rating on google search

JohnLogar

Active member
Hi,
I hoping someone more experienced can help me.

My goal is to show the star rating on google search like in the attachment.
1600945067105.webp
I'm using the following resource to get the rating from the user on threads.


The resource getting the rating and now I want to show on google.
After searching on google they recommended using the following code snippet as an example.

Code:
<html>
  <head>
    <title>Apple Pie by Grandma</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "Recipe",
      "name": "Apple Pie by Grandma",
      "author": "Elaine Smith",
      "image": "http://images.edge-generalmills.com/56459281-6fe6-4d9d-984f-385c9488d824.jpg",
      "description": "A classic apple pie.",
      "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.8",
        "reviewCount": "7462",
        "bestRating": "5",
        "worstRating": "1"
      },
      "prepTime": "PT30M",
      "totalTime": "PT1H30M",
      "recipeYield": "8",
      "nutrition": {
        "@type": "NutritionInformation",
        "calories": "512 calories"
      },
      "recipeIngredient": [
        "1 box refrigerated pie crusts, softened as directed on box",
        "6 cups thinly sliced, peeled apples (6 medium)"
      ]
    }
    </script>
  </head>
  <body>
  </body>
</html>

adding this code snippet on the thread_view template is a good idea? If someone has any recommendation please share I will consider it.

Regards
 
Top Bottom