Following a tutorial I integrated the structured data in my WordPress website but when I run the google sd testing tool I continue to get an error that I can not fix on the logo and other minor things.
Here is my code (for what regards the “Article”).
$payload["@type"] = "Article";
$payload["url"] = $post_url;
$payload["author"] = array(
"@type" => "Person",
"name" => $author_data->display_name,
);
$payload["headline"] = $post_data->post_title;
$payload["datePublished"] = $post_data->post_date;
list($width, $height) = getimagesize( $post_thumb );
$payload["image"] = array(
"@type" => "ImageObject",
"url" => $post_thumb,
"height" => "350",
"width" => "590");
$payload["ArticleSection"] = $category[0]->cat_name;
$payload["Publisher"] = "MyWebsite";
All works good but I got this error/warnings:
logo: mancante e obbligatorio (missing and required
dateModified: mancante e consigliato (Missing and recommended)
mainEntityOfPage: mancante e consigliato (Missing and recommended)
Can someone suggest me how to complete my code?
It seems that Google has recently changed the requirements for Article rich snippets.
See this link for more information : https://productforums.google.com/forum/#!topic/webmasters/ltbw0gUvReM
And this one for documentation : https://developers.google.com/structured-data/rich-snippets/articles#article_markup_properties
Hope it helps.
Edit for logo :
Follow this link to know how to set up the logo : http://schema.org/logo
The messages from the Google SDTT tell you everything you need to know.
Google requires the
logo
property (details) and recommends to provide thedateModified
(details) and themainEntityOfPage
(details) properties.Note that Google requires/recommends this only for their search result features. From the Schema.org perspective, itâs perfectly fine not to provide these properties.