• Hi all,

    not sure if this is the right section of the forum, kindly move my post if it is not (and sorry).

    I am trying to implement some schema markup type on my website, just a simple question: is it possible to have dynamic values for some properties?

    Easier with an example, here https://imgur.com/Pm3FOZQ you can find an implementation of Restaurant type by schema.org
    I highlighted the aggregateRating properties, the value for ratingValue is ‘4’ and the value for reviewCount is ‘250’

    I imagine those values MUST be dynamic, some hours later they can have another review and reviewCount would need to become ‘251’.

    So, how to implement this in the script (JSON-LD) of the schema type?

    Also, is it possible to implement schema markup in archive pages?
    I read that you can only implement it on single pages, but it does make sense to me. Again for dynamicity, I have archive pages that contain lists of products (links to product pages) that dynamically change according to rating or review count for example.
    So, how to use a schema markup in there?

    My aim is to have a rich snippet in Google results which show, let’s say, the first 5 products (links to product pages) that at that moment are ‘the best 5’ (for rating or review maybe).

    I am using SiteReview as the plugin for the review (maybe the best place for this post would be in SiteReview plugin, not sure).

    Thanks in advance!
    Daniele

    • This topic was modified 4 years, 10 months ago by danielecelsa.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The SiteReview plugin has the JSON Schema implementation by itself.

    https://www.ads-software.com/plugins/site-reviews/

    Thread Starter danielecelsa

    (@danielecelsa)

    Hi,

    thanks for your kind reply.

    I see SiteReview has JSON schema implemented by itself, but I am still wondering how to add dynamic values on the properties of a schema and how to use schema markup in archive pages, in general.

    SiteReview works well for Schema markup Product maybe, so on each product page I will have Product Schema and all the rating/review count well ‘markupped’ (in some way dynamically, because the values change each time someone adds a review and thanks to SiteReview I can reach this).

    BUT my question is in general, and in particular for the archive pages that I mentioned in the first post where I have a list of links that lead to Product pages.
    So, in the product pages I will use Product schema by SiteReview, but what can I use to markup the archive pages with those lists of (dynamics) links to product pages?

    Hope I have been clear.

    Thanks,
    Daniele

    use to markup the archive pages with those lists of (dynamics) links to product pages?

    Yes, you can. You need to get the total number of reviews and the average rating i.e (3, 4, 4.3 or 5) ( from SiteReview ) on a particular product. Once you get the required details for a particular product, then use the JSON Schema markup to add that details.

    On Archive Page:

    You need to build a query with the help of join to collect the products with reviews and ratings from the SiteReview database.

    
    Product 1 
        ( Total number of reviews and avg. rating SiteReview 10 )
        JSON Schema 
    Product 2 
        ( Total number of reviews and avg. rating SiteReview 20 )
        JSON Schema
    Product 3 
        ( Total number of reviews and avg. rating SiteReview 0 )
        JSON Schema
    

    I hope you understand.

    • This reply was modified 4 years, 10 months ago by Jogesh.
    Thread Starter danielecelsa

    (@danielecelsa)

    Hi,

    thanks again for your kind reply.

    Unfortunately, I did not understand well..:(
    May I ask you a little practical example with a code doing what you explained?

    Also, should I insert this code in the header of the theme of the archive pages?

    The thing is that I cannot get the required details for a product ‘manually’ and insert them into the code, because these details change dynamically (each time someone adds a review).
    Maybe should I use the meta keys provided by SiteReview like _glsr_average or _glsr_ranking?

    Really thanks in advance if you will help me.

    Cheers,
    Daniele

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to have dynamic values on properties in schema.org type + archive pages’ is closed to new replies.