JSON structured data: issue with author type “Thing”
-
Hello there,
The rich results testing tool https://search.google.com/test/rich-results flags an issue with the type assigned to the author field in the structured data generated by your plugin. Actually, this issue is flagged even twice, both in the product and review structured data snippets.
The issue is that the type “Thing” assigned to the author field is not valid, since it only features two possible types, namely “Person” and “Organization”.
When I manually edited the type “Thing” and put “Organization” instead in the line 1318 of the file wp-postratings.php, the problem was solved. Hereby you can find the schema.org I am talking of.
$ratings_meta .= '<script type="application/ld+json"> { "@context": "https://schema.org/", "@type": "Product", "url": "' . get_permalink() . '", "name": "' . $productName . '", "review": { "@type": "Review", "reviewRating": { "@type": "Rating", "bestRating": "'. $ratings_max .'", "ratingValue": "' . str_replace( ',', '.', $post_ratings_average ) . '", "worstRating": "1" }, "author": { "@type": "Thing", "name": '.json_encode(get_bloginfo('name')).' } } } </script>';
Could you please release a new version of the plugin where the type “Organization” is assigned to the author field instead of “Thing”? Or maybe you could let the user chooose wheter they prefer the “Organization” or “Person” value in the plugin options?
If the above is not possible for some reasons could you provide us with at least some code-snippet to be added to the functions.php of the child theme which overwrites “Thing” with “Organization”?
Looking forward for your reply,
Roman
The page I need help with: [log in to see the link]
- The topic ‘JSON structured data: issue with author type “Thing”’ is closed to new replies.