[Resolved] adding aggregateRating for my website

Home Forums Support [Resolved] adding aggregateRating for my website

Home Forums Support adding aggregateRating for my website

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #2310596
    Sima

    I have created the following hook but when I test my website for google rich results, I do not see this property.

    {
    "@context": "https://schema.org/",
    "@type": "CreativeWorkSeries",
    "name": "",
    "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.9",
    "bestRating": "5",
    "ratingCount": "17"
    }
    }
    #2310802
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to the page where this should be displayed?

    And can you confirm how you used a Hook to add this ?

    #2311234
    Sima

    Hello David,
    I added to WP_head and elected entire site for display rule.

    When I check my website URL at https://search.google.com/test/rich-results

    I expect to see Review Snippets but I do not.

    #2311282
    Ying
    Staff
    Customer Support

    It looks like it’s been inserted into thebody_open hook.

    If you’ve made changes to the hook, make sure cache is cleared.

    #2311294
    Sima

    I have cleared cache. and I have not inserted it into body_open hook. Pleae let me know what I should do. thanks

    #2311336
    Ying
    Staff
    Customer Support

    From what I can see, it’s in body not head:
    https://www.screencast.com/t/w1NNCaPtBPMk

    Can you disable your cache plugin if you are using one and if you have server-level cache enabled, can you disable that as well?

    If it still doesn’t work, could you provide admin login to your site so we can take a look at the backend?

    #2311505
    Sima

    It still does not work.

    #2311917
    David
    Staff
    Customer Support

    That code has to be wrapped in script tags

    ‹script type="application/ld+json">
       your code here
    </script>
    
    #2311993
    Sima

    Hello David,

    Thanks for your comment. Does this need to be added to hook? I did, and when testing the code with the rich test result, it returns an error “item not detected.”
    I

    #2312153
    Sima

    never mind. I figured out.

    #2312349
    David
    Staff
    Customer Support
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.