• Resolved Moumen Ahmed

    (@etswak1)


    Hello guys I would like to thank all the developers of this plugin it is really amazing and my special thanks goes to Mr. Paul Ryley.
    I have an inquiry about the (Schema Service), how do I show the Review snippets for it on google rich result .
    I have custom code for schema service i used it on rank math Schema Builder, I can see the Site Reviews plugin is already succeeded added Review and aggregate Rating on rank math schema preview, But when i test on google rich result i get Invalid object type for field itemReviewed .
    I would be very grateful if you could help me to solve this problem.

    This is the code I use

    {
      "@context": "https://schema.org",
      "@graph": {
        "@type": "Service",
        "serviceType": "service type",
        "name": "service name",
        "url": "https://etswak.net/",
        "description": "service description",
        "providerMobility": "dynamic",
        "mainEntityOfPage": "https://etswak.net/page",
        "sameAs": [
          "https://www.facebook.com/"
        ],
        "category": [
          "Security Systems",
          "Intercom"
        ],
        "image": {
          "@type": "ImageObject",
          "url": "https://etswak.net/service.png"
        },
        "provider": {
          "@type": "LocalBusiness",
          "url": "https://etswak.net/",
          "name": "Etswak",
          "email": "[email protected]",
          "logo": "https://etswak.net/logo.png",
          "description": "Business description",
          "keywords": "KEYWORDS",
          "mainEntityOfPage": "https://etswak.net/",
          "sameAs": [
            "https://www.facebook.com/"
          ],
          "address": {
            "@type": "PostalAddress",
            "streetAddress": "123StreetAddress",
            "addressLocality": "City",
            "addressRegion": "Region",
            "postalCode": "113001",
            "addressCountry": "Country"
          },
          "priceRange": "$$",
          "telephone": "12345",
          "openingHoursSpecification": {
            "@type": "OpeningHoursSpecification",
            "dayOfWeek": [
              "Saturday",
              "Sunday",
              "Monday",
              "Tuesday",
              "Wednesday",
              "Thursday",
              "Friday"
            ],
            "opens": "09:00",
            "closes": "19:00"
          },
          "contactPoint": {
            "@type": "ContactPoint",
            "name": "Support",
            "email": "[email protected]",
            "url": "https://etswak.net/about-us",
            "contactType": "customer support"
          },
          "geo": {
            "@type": "GeoCoordinates",
            "latitude": "48.01945214525053",
            "longitude": "29.32919316205628"
          },
          "areaServed": [
            {
              "@type": "City",
              "name": "City1",
              "@id": "https://ar.wikipedia.org/City1"
            },
            {
              "@type": "City",
              "name": "City2",
              "@id": "https://ar.wikipedia.org/City2"
            },
            {
              "@type": "City",
              "name": "City3",
              "@id": "https://ar.wikipedia.org/City3"
            }
          ],
          "image": {
            "@type": "ImageObject",
            "url": "https://demo.etswak.net/logo.png"
          
          },
          "hasOfferCatalog": {
            "@type": "OfferCatalog",
            "name": "1 services",
            "itemListElement": [
              {
                "@type": "OfferCatalog",
                "name": "2 services",
                "itemListElement": [
                  {
                    "@type": "Offer",
                    "itemOffered": {
                      "@type": "Service",
                      "name": "3 services"
                    }
                  },
                  {
                    "@type": "Offer",
                    "itemOffered": {
                      "@type": "Service",
                      "name": "4 services"
                    }
                  },
                  {
                    "@type": "Offer",
                    "itemOffered": {
                      "@type": "Service",
                      "name": "5 services"
                    }
                  }
                ]
              }
            ]
          },
          "potentialAction": {
            "@type": "ReserveAction",
            "target": {
              "@type": "EntryPoint",
              "urlTemplate": "https://etswak.net/contact-us/",
              "inLanguage": "ar",
              "actionPlatform": [
                "https://schema.org/DesktopWebPlatform",
                "https://schema.org/IOSPlatform",
                "https://schema.org/AndroidPlatform"
              ]
            },
            "result": {
              "@type": "Reservation",
              "name": "Book an Appointment"
            }
          }
        }
      }
    }

    And this is a screenshot of the preview schema of rank math .

    This same code works without problems after i added the Site Reviews, aggregateRating & Review manually by copy and paste .

    {
      "@context": "https://schema.org",
      "@graph": {
        "@type": "Service",
        "serviceType": "service type",
        "name": "service name",
        "url": "https://etswak.net/",
        "description": "service description",
        "providerMobility": "dynamic",
        "mainEntityOfPage": "https://etswak.net/page",
        "sameAs": [
          "https://www.facebook.com/"
        ],
        "category": [
          "Security Systems",
          "Intercom"
        ],
        "image": {
          "@type": "ImageObject",
          "url": "https://etswak.net/service.png"
        },
        "provider": {
          "@type": "LocalBusiness",
          "url": "https://etswak.net/",
          "name": "Etswak",
          "email": "[email protected]",
          "logo": "https://etswak.net/logo.png",
          "description": "Business description",
          "keywords": "KEYWORDS",
          "mainEntityOfPage": "https://etswak.net/",
          "sameAs": [
            "https://www.facebook.com/"
          ],
          "address": {
            "@type": "PostalAddress",
            "streetAddress": "123StreetAddress",
            "addressLocality": "City",
            "addressRegion": "Region",
            "postalCode": "113001",
            "addressCountry": "Country"
          },
          "priceRange": "$$",
          "telephone": "12345",
          "openingHoursSpecification": {
            "@type": "OpeningHoursSpecification",
            "dayOfWeek": [
              "Saturday",
              "Sunday",
              "Monday",
              "Tuesday",
              "Wednesday",
              "Thursday",
              "Friday"
            ],
            "opens": "09:00",
            "closes": "19:00"
          },
          "contactPoint": {
            "@type": "ContactPoint",
            "name": "Support",
            "email": "[email protected]",
            "url": "https://etswak.net/about-us",
            "contactType": "customer support"
          },
          "geo": {
            "@type": "GeoCoordinates",
            "latitude": "48.01945214525053",
            "longitude": "29.32919316205628"
          },
          "areaServed": [
            {
              "@type": "City",
              "name": "City1",
              "@id": "https://ar.wikipedia.org/City1"
            },
            {
              "@type": "City",
              "name": "City2",
              "@id": "https://ar.wikipedia.org/City2"
            },
            {
              "@type": "City",
              "name": "City3",
              "@id": "https://ar.wikipedia.org/City3"
            }
          ],
          "image": {
            "@type": "ImageObject",
            "url": "https://demo.etswak.net/logo.png"
          },
          "aggregateRating": {
            "@type": "AggregateRating",
            "ratingValue": "5",
            "bestRating": "5",
            "worstRating": "0",
            "ratingCount": "1"
          },
          "review": {
            "@type": "Review",
            "name": "GOOD",
            "reviewBody": "Nice",
            "datePublished": "2023-08-10T01:56:56+00:00",
            "author": {
              "@type": "Person",
              "name": "LEE"
            },
            "reviewRating": {
              "@type": "Rating",
              "ratingValue": "5",
              "bestRating": "5",
              "worstRating": "0"
            }
          },
          "hasOfferCatalog": {
            "@type": "OfferCatalog",
            "name": "1 services",
            "itemListElement": [
              {
                "@type": "OfferCatalog",
                "name": "2 services",
                "itemListElement": [
                  {
                    "@type": "Offer",
                    "itemOffered": {
                      "@type": "Service",
                      "name": "3 services"
                    }
                  },
                  {
                    "@type": "Offer",
                    "itemOffered": {
                      "@type": "Service",
                      "name": "4 services"
                    }
                  },
                  {
                    "@type": "Offer",
                    "itemOffered": {
                      "@type": "Service",
                      "name": "5 services"
                    }
                  }
                ]
              }
            ]
          },
          "potentialAction": {
            "@type": "ReserveAction",
            "target": {
              "@type": "EntryPoint",
              "urlTemplate": "https://etswak.net/contact-us/",
              "inLanguage": "ar",
              "actionPlatform": [
                "https://schema.org/DesktopWebPlatform",
                "https://schema.org/IOSPlatform",
                "https://schema.org/AndroidPlatform"
              ]
            },
            "result": {
              "@type": "Reservation",
              "name": "Book an Appointment"
            }
          }
        }
      }
    }

    What is the solution Show Review rating on this code with the plugin ?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    While the Service Schema.org Type supports the aggregateRating and review properties, it is not supported by Google for rich snippets.

    Please refer to the following support page when selecting your Schema Type: https://developers.google.com/search/docs/appearance/structured-data/review-snippet

    Thread Starter Moumen Ahmed

    (@etswak1)

    Hi, yes I’m already know the schema types supported by Google I noticed that the plugin generates two review schema , the first to the localbusiness which no problem on Google rich results and the second to the services which not support by Google rich result .

    The question here is :

    Can we prevent the plugin from generating the review to the services schema and keep the review for localbusiness using a custom code?

    Or what is the solution do you think can solve this?

    Thread Starter Moumen Ahmed

    (@etswak1)

    Here the screenshot of reviews showing on Google rich result.

    Plugin Author Gemini Labs

    (@geminilabs)

    Can we prevent the plugin from generating the review to the services schema and keep the review for localbusiness using a custom code?

    You can do this two ways:

    Option 1: Remove schema support for the Service type:

    add_filter('site-reviews/defaults/rating-schema-type/defaults', function ($defaults) {
        unset($defaults['Service']);
        return $defaults;
    });

    Option 2: Only allow the LocalBusiness schema type:

    add_filter('site-reviews/defaults/rating-schema-type/defaults', function () {
        return [
            'LocalBusiness',
        ];
    });

    Note: this will only work if using the RankMath Pro integration.

    Thread Starter Moumen Ahmed

    (@etswak1)

    Big thanks to all of you, The code work good .

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Invalid object type for field itemReviewed Schema Service’ is closed to new replies.