Support » Fixing WordPress » schema.org itemreviewed issue with service associated with aggregateRating

  • Philipp

    (@morpheus200k)


    Dear all,

    I need help with this issue. Does anybody have experience with schema.org “service” with “aggregateRating”? Google test tool for structured data shows me an error “Service is not a valid target type for the itemReviewed property.”

    Here is the code I created:

      {
                    "@context": "http://schema.org",
        "@type": "Service",
        "name": "<?php the_title(); ?>",
    	"description": "<?php the_excerpt(); ?>",
        "brand": "b-ceed: events",
    	"image": "<?php echo $feat_image ?>",
    		"aggregateRating": {
            "@context": "http://schema.org",
            "@type": "AggregateRating",
            "ratingValue": "<?php the_field('rating_erfolg'); ?>",
            "bestRating": "5",
            "reviewCount": "<?php the_field('wie_oft_wurde_bewertet'); ?>",
            "worstRating": "1"
        },
        "offers": {
            "@context": "http://schema.org",
            "@type": "Offer",
            "url": "<?php the_permalink(); ?>",
    		"priceCurrency": "EUR",
            "price": "<?php the_field('preis_klasse_1'); ?>",
            "pricevaliduntil":"2022-12-31",
    		"availability": "http://schema.org/InStock",
    	    "category": "Firmenevents"
                                       },
      "review": [
        {
          "@type": "Review",
          "author": "<?php the_field('review_author'); ?>",
          "datePublished": "<?php the_field('review_date'); ?>",
          "description": "<?php the_field('review_description'); ?>",
          "name": "<?php the_field('review_name'); ?>",
          "reviewRating": {
            "@type": "Rating",
            "bestRating": "5",
            "ratingValue": "<?php the_field('review_rating'); ?>",
            "worstRating": "1"
           }
        }
      ]
    }

    It’s a German website but I hope you can still understand the overall code.

    Best regards
    Philipp

    • This topic was modified 1 year, 8 months ago by Philipp. Reason: I put more information in
    • This topic was modified 1 year, 8 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • This is not a WordPress question. You should ask at StackOverflow or somewhere that might know something about it.

Viewing 1 replies (of 1 total)
  • The topic ‘schema.org itemreviewed issue with service associated with aggregateRating’ is closed to new replies.